Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PropertyDelegateBuilder

The PropertyDelegateBuilder delegates the access of a property to an embedded element.

Hierarchy

  • PropertyDelegateBuilder

Implements

Index

Constructors

constructor

  • new PropertyDelegateBuilder(propName: string, selector?: string, toAttrName?: string, toPropName?: string, isShadow?: boolean, isBoolean?: boolean): PropertyDelegateBuilder
  • Parameters

    • propName: string
    • Optional selector: string
    • Optional toAttrName: string
    • Optional toPropName: string
    • Default value isShadow: boolean = false
    • Default value isBoolean: boolean = false

    Returns PropertyDelegateBuilder

Properties

Private isBoolean

isBoolean: boolean

Private isShadow

isShadow: boolean

Private Readonly propName

propName: string

Private Optional selector

selector: string

Private Optional toAttrName

toAttrName: string

Private Optional toPropName

toPropName: string

Methods

attribute

  • attribute(toAttrName: string): this
  • Delegate to an attribute.

    Parameters

    • toAttrName: string

      the attribute name.

    Returns this

boolean

  • boolean(): this
  • Only used when delegating to an attribute. When the value is truthy, the attribute's value is "". When the value is falsy, the attribute is removed.

    Returns this

build

property

  • property(toPropName: string): this
  • Delegate to property.

    Parameters

    • toPropName: string

      the property name.

    Returns this

shadow

  • shadow(): this
  • By default, the selection of the element is done in the light DOM. This option forces the selection into the shadow DOM.

    Returns this

to

  • to(selector: string): this
  • The CSS selector used to identify the DOM element(s).

    Parameters

    • selector: string

      the selector

    Returns this

Static delegate

Static get

Generated using TypeDoc