Last updated

API / geotoolkit / flowcharts / utils / LiteEvent / LiteEvent

Class: LiteEvent

utils.LiteEvent.LiteEvent

A simple and lite event emitter that represents a collection of functions that will be invoked upon trigger() call

Table of contents

Constructors
Methods

Contents

Constructors

new LiteEvent()

new LiteEvent()

Methods

off

off(handler): void

Unsubscribes a handler from the event

Parameters

Name Type Description
handlerHandlerfunction handler

Returns

void


on

on(handler): void

Subscribes a handler to the event

Parameters

Name Type Description
handlerHandlerfunction handler

Returns

void


trigger

trigger(data): void

Emits an event with the specified data

Parameters

Name Type Description
dataNode[]event data that will be passed to all subscribed event handlers

Returns

void