public class | source

Event

Represents the class for event.

Constructor Summary

Public Constructor
public

constructor(name: string)

Create instance.

Member Summary

Public Members
public get

name: string

Event name.

source

Method Summary

Public Methods
public

off(subscriber: function)

Unsubscribe from event.

source
public

on(subscriber: function)

Subscribe to event.

source
public

trigger(data: object)

Trigger the event.

source

Public Constructors

public constructor(name: string) source

Create instance.

Params:

NameTypeAttributeDescription
name string

Event name.

Public Members

public get name: string source

Event name.

Public Methods

public off(subscriber: function) source

Unsubscribe from event.

Params:

NameTypeAttributeDescription
subscriber function

Event handler function.

public on(subscriber: function) source

Subscribe to event.

Params:

NameTypeAttributeDescription
subscriber function

Event handler function.

public trigger(data: object) source

Trigger the event.

Params:

NameTypeAttributeDescription
data object