Class DOMEventMixin

Adds event-related methods to the control.

Index

Methods

Methods

public addEventListener(type: string, listener: Function, useCapture?: boolean)

Adds an event listener to the control.

Parameters

  • type: string

    The type (name) of the event.

  • listener: Function

    The listener to invoke when the event gets raised.

  • useCapture?: boolean optional

    true to initiate capture; otherwise, false.

public dispatchEvent(type: string, eventProperties: any): boolean

Raises an event of the specified type, adding the specified additional properties.

Parameters

  • type: string

    The type (name) of the event.

  • eventProperties: any

    The set of additional properties to be attached to the event object when the event is raised.

Returns

boolean

true if preventDefault was called on the event, otherwise false.

public removeEventListener(type: string, listener: Function, useCapture?: boolean)

Removes an event listener from the control.

Parameters

  • type: string

    The type (name) of the event.

  • listener: Function

    The listener to remove.

  • useCapture?: boolean optional

    true to initiate capture; otherwise, false.

public setOptions(control: any, options: any)

Adds the set of declaratively specified options (properties and events) to the specified control. If the name of the options property begins with "on", the property value is a function and the control supports addEventListener. This method calls the addEventListener method on the control.

Parameters

  • control: any

    The control on which the properties and events are to be applied.

  • options: any

    The set of options that are specified declaratively.