Caplin Trader 4.7.1

Class: module:caplin/core/EmittingMap

module:caplin/core/EmittingMap

Constructor

new module:caplin/core/EmittingMap(properties)

This class stores an Object along with getter and setter methods. The purpose of this class is to make an object "listenable". It provides a module:caplin/core/EmittingMap#set method that triggers a property-changed event.
Parameters:
Name Type Description
properties Object The Object to be made "listenable."
Mixes In:

Methods

get(name)

Parameters:
Name Type Description
name String The property name.
Returns:
The given property's value.

set(name, value)

Sets the given property to the given value and notifies any listeners of the change.
Parameters:
Name Type Description
name String The property name.
value * The value to assign the given property.