Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EventPart

An AttributePart that manages an event listener via add/removeEventListener.

This part works by adding itself as the event listener on an element, then delegating to the value passed to it. This reduces the number of calls to add/removeEventListener if the listener changes frequently, such as when an inline function is used as a listener.

Because event options are passed when adding listeners, we must take case to add and remove the part as a listener when the event options change.

Hierarchy

Index

Constructors

Properties

_sanitizer: undefined | ValueSanitizer
element: HTMLElement
name: string
options: undefined | RenderOptions
strings?: readonly string[]

If this attribute part represents an interpolation, this contains the static strings of the interpolation. For single-value, complete bindings, this is undefined.

type: 5 = 5

Accessors

  • get _$isConnected(): boolean
  • Returns boolean

  • get tagName(): string
  • Returns string

Methods

  • handleEvent(event: Event): void
  • Parameters

    • event: Event

    Returns void

Generated using TypeDoc