@arcmantle/adapter-element
    Preparing search index...

    Class AsyncDirectiveAbstract

    An abstract Directive base class whose disconnected method will be called when the part containing the directive is cleared as a result of re-rendering, or when the user calls part.setConnected(false) on a part that was previously rendered containing the directive (as happens when e.g. a LitElement disconnects from the DOM).

    If part.setConnected(true) is subsequently called on a containing part, the directive's reconnected method will be called prior to its next update/render callbacks. When implementing disconnected, reconnected should also be implemented to be compatible with reconnection.

    Note that updates may occur while the directive is disconnected. As such, directives should generally check the this.isConnected flag during render/update to determine whether it is safe to subscribe to resources that may prevent garbage collection.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    isConnected: boolean

    The connection state for this Directive.

    Accessors

    • get _$isConnected(): boolean

      Returns boolean

    Methods

    • Initialize the part with internal fields

      Parameters

      Returns void

    • User callbacks for implementing logic to release any resources/subscriptions that may have been retained by this directive. Since directives may also be re-connected, reconnected should also be implemented to restore the working state of the directive prior to the next render.

      Returns void

    • Returns void

    • Parameters

      • ...props: unknown[]

      Returns unknown

    • Sets the value of the directive's Part outside the normal update/render lifecycle of a directive.

      This method should not be called synchronously from a directive's update or render.

      Parameters

      • value: unknown

        The value to set

      Returns void

    • Parameters

      • _part: Part
      • props: unknown[]

      Returns unknown