monster.pub()

Syntax

monster.pub(topic[, data]);

Parameters

KeyDescriptionTypeDefaultRequired
topicAlias for the method to publish.Stringtrue
dataParameters passed to the method published.Object, Array, String, Number, Function{}false

Description

The monster.pub() method let you publish all the methods that were exposed by other developers of Monster applications or let you access the Monster Core Apps and Monster Common Controls methods to perform common actions (see examples).

To see how to make a method publishable, go to the related documentation.

Examples

monster.pub('myaccount.hide');

Invoke the buyNumbers common control

monster.pub('common.buyNumbers');