Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Event<T>

The Event class is used as the base class for the creation of Event objects

export
implements

{IEvent}

Type parameters

  • T

Hierarchy

  • Event

Index

Constructors

constructor

  • new Event(type: string, bubbles?: boolean, cancellable?: boolean, data?: any): Event
  • Creates an Event object for the specified event.

    memberof

    Event

    Parameters

    • type: string
    • Default value bubbles: boolean = false
    • Default value cancellable: boolean = false
    • Default value data: any = null

    Returns Event

Properties

bubbles

bubbles: boolean = false

Indicates whether an event is a bubbling event.

memberof

Event

cancellable

cancellable: boolean = false

Indicates whether the behavior associated with the event can be cancelled.

memberof

Event

currentTarget

currentTarget: any = null

The object that is actively processing the Event object with an event listener.

memberof

Event

data

data: T

Data associated with the event.

memberof

Event

defaultPrevented

defaultPrevented: boolean

isPropagationStopped

isPropagationStopped: boolean = false

target

target: any = null

The event target.

memberof

Event

type

type: string

The type of event.

memberof

Event

Methods

isDefaultPrevented

  • isDefaultPrevented(): boolean
  • Checks whether the preventDefault() method has been called on the event.

    memberof

    Event

    Returns boolean

preventDefault

  • preventDefault(): void
  • Cancels an event's default behavior if that behavior can be cancelled.

    memberof

    Event

    Returns void

stopImmediatePropagation

  • stopImmediatePropagation(): void
  • Prevents processig of any event listeners in the current node and any subsequent nodes in the event flow.

    memberof

    Event

    Returns void

stopPropagation

  • stopPropagation(): void
  • Prevents processing of any event listeners in nodes subsequent to the current node in the event flow.

    memberof

    Event

    Returns void

toJSON

  • Returns a JSON object representation of the event.

    memberof

    Event

    Returns EventObject

Generated using TypeDoc