Blockly.utils. idGenerator
Generators for unique IDs.
Methods
genUid
genUid() returns string
Generate a random unique ID.
- See also
- internal.genUid
- Returns
-
string
A globally unique ID string.
getNextUniqueId
getNextUniqueId() returns string
Generate the next unique element IDs. IDs are compatible with the HTML4 id attribute restrictions: Use only ASCII letters, digits, '_', '-' and '.'
For UUIDs use genUid (below) instead; this ID generator should primarily be used for IDs that end up in the DOM.
- Returns
-
string
The next unique identifier.