Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Widget

The namespace for the Widget class statics.

Index

Modules

Enumerations

Classes

Interfaces

Functions

Functions

attach

  • attach(widget: Widget, host: HTMLElement, ref?: HTMLElement | null): void
  • Attach a widget to a host DOM node.

    Parameters

    • widget: Widget

      The widget of interest.

    • host: HTMLElement

      The DOM node to use as the widget's host.

    • Default value ref: HTMLElement | null = null

      The child of host to use as the reference element. If this is provided, the widget will be inserted before this node in the host. The default is null, which will cause the widget to be added as the last child of the host.

      Notes

      This will throw an error if the widget is not a root widget, if the widget is already attached, or if the host is not attached to the DOM.

    Returns void

detach

  • detach(widget: Widget): void
  • Detach the widget from its host DOM node.

    Parameters

    • widget: Widget

      The widget of interest.

      Notes

      This will throw an error if the widget is not a root widget, or if the widget is not attached to the DOM.

    Returns void

Generated using TypeDoc