Messenger Molecule
From oWiki
Contents |
Preference Dialog
Attributes
type
string ( r )
Type of this molecule, 'messenger'.
pref.name
string ( r )
Specifies the event name.
pref.enableWhen
string ( r, w )
Specifies the event that activates this molecule. Default is 'none'.
pref.withData
string ( r, w )
Specifies the object, variable, or array molecule that is to be sent along with the event as data.
pref.isBroadcast
bool ( r, w )
Specifies whether the event is sent to all droplets in the current page or a few selected droplets in a group.
pref.targets
array ( r, w )
Specifies the list of droplet names that the event is sent to when molecule is enabled.
Methods
clone()
Return: a molecule
| Create a clone of this molecule. |
attach(droplet)
droplet: a droplet object (e.g. app.box.droplet)
| Attach this molecule to a droplet. |
detach()
| Remove this molecule from its droplet. |
deleteMod()
| Delete this molecule. |
serialize()
Return: string
| Serialize this molecule into its JSON representation. |
Comments
Once the message name is set, it cannot be changed dynamically.

