EventState

A class serves as a medium between the observable and its observers

Hierarchy

  • EventState

Index

Constructors

constructor

  • new EventState(mask: number, skipNextObservers?: boolean, target?: any, currentTarget?: any): EventState
  • Create a new EventState

    Parameters

    • mask: number

      defines the mask associated with this state

    • Optional skipNextObservers: boolean

      defines a flag which will instruct the observable to skip following observers when set to true

    • Optional target: any

      defines the original target of the state

    • Optional currentTarget: any

      defines the current target of the state

    Returns EventState

Properties

Optional currentTarget

currentTarget: any

The current object in the bubbling phase

Optional lastReturnValue

lastReturnValue: any

This will be populated with the return value of the last function that was executed. If it is the first function in the callback chain it will be the event data.

mask

mask: number

Get the mask value that were used to trigger the event corresponding to this EventState object

skipNextObservers

skipNextObservers: boolean

An Observer can set this property to true to prevent subsequent observers of being notified

Optional target

target: any

The object that originally notified the event

Methods

initalize

  • initalize(mask: number, skipNextObservers?: boolean, target?: any, currentTarget?: any): EventState
  • Initialize the current event state

    Parameters

    • mask: number

      defines the mask associated with this state

    • Optional skipNextObservers: boolean

      defines a flag which will instruct the observable to skip following observers when set to true

    • Optional target: any

      defines the original target of the state

    • Optional currentTarget: any

      defines the current target of the state

    Returns EventState

    the current event state

Generated using TypeDoc