Get resolved attribute value (Beta)
Get resolved attribute value (Beta)
element.getResolvedAttributeValue(name)
Get the resolved value of a single attribute on an element.
This method returns the final output value for the named attribute. If the attribute value is bound to a variable or component prop, the binding is resolved to its current string value rather than returned as a binding reference.
To get the raw value including any binding reference, use element.getAttributeValue().
Beta
These methods are in public beta and may change with future releases.
Syntax
Parameters
name: string — The name of the attribute whose resolved value to retrieve.
Returns
Promise<string | null>
A Promise that resolves to the attribute’s current string value, or null if no attribute with the given name exists.
Example
Designer Ability
Checks for authorization only.