new RegistryElement()
An element that can be registered
Methods
deregister()
Deregisters the element. The id will be undefined afterwards. Equivalent to setId(undefined)
- See
- setId
id() → {string}
Returns the registered ID, or undefined if not registered.
Returns:
- Type:
- string
registryType() → {string}
Returns the name of the registry that contains elements of this type
Returns:
- Type:
- string
setId(id, replaceScriptReferences)
Registers the element with the given ID. If the element has already been registered, then the id changes. If the id is undefined, then the element will be deregistered.
Parameters:
Name | Type | Description |
---|---|---|
id | string | The ID |
replaceScriptReferences | boolean | True if ID references in scripts should be replaced. Only done when the old and the new ID is not undefined. |