Bridge Elements
The BridgeElement class lets you easily use bridge-specific data and behaviors on elements in your components. You can wrap any element in a new BridgeElement(myElement) within your bridge components to access the following:
title: Returns the title of the element, attempting to use adata-bridge-titlevalue first, thearia-labelvalue second, then otherwise falling back to the element’stextContentorvalue.disabled: Returns whether the element is disabled with thedata-bridge-disabledattribute.enabled: Returns the opposite ofdisabled.enableForComponent(component): Removes thedata-bridge-disabledattribute on the element.hasClass(className): Returns whether the element has a particular class in itsclassList.attribute(name): Returns the value of an attribute on the element.bridgeAttribute(name): Returns the value of adata-bridge-<name>attribute on the element.setBridgeAttribute(name, value): Sets the value of adata-bridge-<name>attribute on the element.removeBridgeAttribute(name): Removes thedata-bridge-<name>attribute on the element.click(): Performs a click on the element.