Options
All
  • Public
  • Public/Protected
  • All
Menu

Class 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 currentTargetSearch playground for currentTarget

currentTarget: any

The current object in the bubbling phase

Optional lastReturnValueSearch playground for 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.

maskSearch playground for mask

mask: number

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

skipNextObserversSearch playground for skipNextObservers

skipNextObservers: boolean

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

Optional targetSearch playground for target

target: any

The object that originally notified the event

Optional userInfoSearch playground for userInfo

userInfo: any

User defined information that will be sent to observers

Methods

initializeSearch playground for initialize

  • initialize(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

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method