AbstractCreates the HTMLElement and attaches a closed shadow DOM to only allow styling via this component.
The named parameters
Optionaladopted_cb?: CHtmlComponentCBThe callback that handles the adoptedCallback method.
Optionalattribute_changed_cb?: CAttributeChangeCBThe callback that handles the attributeChangedCallback method.
Optionalconnected_cb?: CHtmlComponentCBThe callback that handles the connectedCallback method.
Optionalconnected_move_cb?: CHtmlComponentCBThe callback that handles the connectedMoveCallback method.
Optionaldisconnected_cb?: CHtmlComponentCBThe callback that handles the disconnectedCallback method.
Called each time the element is moved to a new document.
Called when attributes are changed, added, removed, or replaced.
The name of a observedAttributes allowing access into the internals of the custom component.
The original value held by the attribute.
The new value to apply.
Called each time the element is added to the document. The specification recommends that, as far as possible, developers should implement custom element setup in this callback rather than the constructor.
When defined, this is called instead of connectedCallback() and disconnectedCallback() each time the element is moved to a different place in the DOM via Element.moveBefore(). Use this to avoid running initialization/cleanup code in the connectedCallback() and disconnectedCallback() callbacks when the element is not actually being added to or removed from the DOM. See Lifecycle callbacks and state-preserving moves for more details.
Called each time the element is removed from the document.
Provides the ability to query the DOM for a given css_value by variable name. The design of this function is if a variable name is not what is specified, it is assumed to be the actual property so it is returned instead.
The variable name to search
The value of the CssVariable or the attr returned as it is assumed to be the actual style.
Forces a refresh of the component.
Staticregister_Utility function to register a custom component if it has not already been defined.
The name of the component.
The constructor definition.
Sets up the base class for defining custom HTMLElements to build a user interface for a Single Page App (SPA) / Progressive Web App (PWA) or Rust desktop / mobile TAURI app.