Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EventAcceleration

The acceleration event.

Hierarchy

  • Event
    • EventAcceleration

Index

Constructors

constructor

  • newEventAcceleration(acc: Acceleration, bubbles?: undefined | false | true): EventAcceleration

Properties

acc

acc: Acceleration

The acceleration object

bubbles

bubbles: boolean

Indicate whether the event bubbles up through the hierarchy or not.

currentTarget

currentTarget: Object | null = null

A reference to the currently registered target for the event.

eventPhase

eventPhase: number = 0

Indicates which phase of the event flow is currently being evaluated. Returns an integer value represented by 4 constants:

  • Event.NONE = 0
  • Event.CAPTURING_PHASE = 1
  • Event.AT_TARGET = 2
  • Event.BUBBLING_PHASE = 3 The phases are explained in the [section 3.1, Event dispatch and DOM event flow] markdown, of the DOM Level 3 Events specification.

propagationImmediateStopped

propagationImmediateStopped: boolean = false

Stops propagation for current event immediately, the event won't even be dispatched to the listeners attached in the current target.

propagationStopped

propagationStopped: boolean = false

Stops propagation for current event.

target

target: Object | null = null

A reference to the target to which the event was originally dispatched.

type

type: string

The name of the event (case-sensitive), e.g. "click", "fire", or "submit".

Static ACCELERATION

ACCELERATION: string = "acceleration"

The type code of Acceleration event.

Static AT_TARGET

AT_TARGET: number = 2

The target phase comprises only the event target node [markdown] (http://www.w3.org/TR/DOM-Level-3-Events/#event-flow)

Static BUBBLING_PHASE

BUBBLING_PHASE: number = 3

The bubbling phase comprises any subsequent nodes encountered on the return trip to the root of the hierarchy [markdown] (http://www.w3.org/TR/DOM-Level-3-Events/#event-flow)

Static CAPTURING_PHASE

CAPTURING_PHASE: number = 1

The capturing phase comprises the journey from the root to the last node before the event target's node markdown

Static KEYBOARD

KEYBOARD: string = "keyboard"

The type code of Keyboard event.

Static MOUSE

MOUSE: string = "mouse"

The type code of Mouse event.

Static NONE

NONE: number = 0

Events not currently dispatched are in this phase.

Static NO_TYPE

NO_TYPE: string = "no_type"

Code for event without type.

Static TOUCH

TOUCH: string = "touch"

The type code of Touch event.

Methods

getCurrentTarget

  • getCurrentTarget(): null | Object
  • Gets current target of the event
    note: It only be available when the event listener is associated with node.
    It returns 0 when the listener is associated with fixed priority.

    Returns null | Object

    • The target with which the event associates.

getType

  • getType(): string

isStopped

  • isStopped(): boolean

reuse

  • reuse(type: string, bubbles?: undefined | false | true): void
  • Reinitialize the event for being used again after retrieved from the object pool.

    Parameters

    • type: string

      The name of the event (case-sensitive), e.g. "click", "fire", or "submit"

    • Optional bubbles: undefined | false | true

      A boolean indicating whether the event bubbles up through the tree or not

    Returns void

unuse

  • unuse(): void

Generated using TypeDoc