@cldn/components - v4.1.0
    Preparing search index...

    Class NodeComponent<T>Abstract

    A Node component

    Type Parameters

    • T extends Node

      Node type

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    node: T

    This component's node

    Methods

    • Run a function in the context of this component

      Parameters

      • fn: (this: this, component: this) => any

        Provides this component as the first argument and this.

      Returns this

    • Add event listener

      Parameters

      • type: string

        A case-sensitive string representing the event type to listen for.

      • listener: (ev: Event, component: this) => any

        The function that is called when an event of the specified type occurs.

      Returns NodeComponent<T>

    • Add event listener

      Parameters

      • type: string

        A case-sensitive string representing the event type to listen for.

      • listener: (ev: Event, component: this) => any

        The function that is called when an event of the specified type occurs.

      • options: AddEventListenerOptions

        An object that specifies characteristics about the event listener. See options on MDN

      Returns NodeComponent<T>

    • Add event listener

      Parameters

      • type: string

        A case-sensitive string representing the event type to listen for.

      • listener: (ev: Event, component: this) => any

        The function that is called when an event of the specified type occurs.

      • useCapture: boolean

      Returns NodeComponent<T>

    • Render this component in the place of a <slot name="…"></slot>.

      Parameters

      • slot: string

        The slot name

      • Optionalparent: ParentNode = document

        The parent element within to search for slots. Defaults to document

      Returns NodeComponent<T>

      DOMException When the slot is not found