Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ICustomAttributeHandlerClass<T>

The ICustomAttributeHandlerClass interface represents a class of handlers of custom attributes that can be applied to intrinsic (HTML or SVG) elements. The requirements on such classes are:

  1. Implement a constructor accepting IElmVN, attribute value and attribute name (this allows the same handler to serve different attributes).
  2. Implement the ICustomAttributeHandler interface

Type parameters

  • T

Hierarchy

  • ICustomAttributeHandlerClass

Index

Constructors

Constructors

constructor

  • Constructs a new custom attribute handler that will act on the given element and provides the initial value of the attribute. Attribute name is also provided in case the handler supports different attributes. By the time this constructor is called, the DOM element had already been created and standard attributes and event listeners had been applied.

    Parameters

    • elmVN: IElmVN

      Virtual node for this element. The handler can retrieve the DOM element from this interface and also use other methods (e.g. subscribe to services).

    • attrVal: T

      Initial value of the custom attribute

    • Optional attrName: string

      Name of the custom attribute

    Returns ICustomAttributeHandler<T>

Generated using TypeDoc