codemelted.js Module
    Preparing search index...

    Class CHtmlComponentAbstract

    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.

    Hierarchy

    • HTMLElement
      • CHtmlComponent
    Index
    • Called each time the element is moved to a new document.

      Returns void

    • Called when attributes are changed, added, removed, or replaced.

      Parameters

      • name: string

        The name of a observedAttributes allowing access into the internals of the custom component.

      • old_value: string

        The original value held by the attribute.

      • new_value: string

        The new value to apply.

      Returns void

    • 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.

      Returns void

    • 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.

      Returns void

    • Called each time the element is removed from the document.

      Returns void

    • 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.

      Parameters

      • attr: string

        The variable name to search

      Returns string

      The value of the CssVariable or the attr returned as it is assumed to be the actual style.

    • Forces a refresh of the component.

      Returns void

    • Utility function to register a custom component if it has not already been defined.

      Parameters

      • name: string

        The name of the component.

      • element_def: any

        The constructor definition.

      Returns void