Get DOM ID (Beta)
Get DOM ID (Beta)
element.getDomId()
Get the HTML id attribute of an element, or check whether the ID is bound to a data source.
Verify that the element has the domId property before calling this method.
Beta
These methods are in public beta and may change with future releases.
Syntax
Parameters
options(optional):{ bindings: true }— When passed, returns binding metadata instead of the resolved string value if the ID is bound to a data source.
Returns
Promise<string | null>: The current HTML ID as a string, ornullif no ID has been set.Promise<string | BindingValue | null>(when{ bindings: true }is passed): ABindingValueobject if the ID is bound to a data source, ornullif no ID has been set.
Example
Designer Ability
Checks for authorization only.