monster.pub()#

Syntax#

monster.pub(alias[, data]);

Parameters#

topic: String (mandatory)#

Alias for the method to publish

data: Object OR Array OR String OR Number OR Function (optional, default: {})#

Parameters passed to the method published

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#

  • Hide myaccount by publishing the related method exposed by the myaccount core app
monster.pub('myaccount.hide');
  • Invoke the buyNumbers common control
monster.pub('common.buyNumbers');

Edit this page here