/
JSMA event
JSMA event
Overview
What can JSMA event do for me?
Using the JSMA event you can trigger asynchronous processes to Event contents
Index
Methods
The JSMA event provides the following methods:
event.send(url, args)
Starts an asynchronous event with url and args which will be passed as arguments to the receiving contents of type Event. The method returns immediatly.
Example
// MINUTE var lastCallMinute = portal.get("smp.util.time.lastCallMinute"); if (lastCallMinute === null) { lastCallMinute = 0; } else { lastCallMinute = parseInt(lastCallMinute); } if (now - lastCallMinute > 60 * 1000 - 1000) { event.send("/timer/minute", {}); portal.set("smp.util.time.lastCallMinute", "" + now, { broadcastEvent : false }); }
Parameter url:string (required)
The URL which will be used to search for the matching WebEvents.
Parameter args:string[] (required)
An array of parameters which is overgiven as args to each matching WebEvent.
Related content
JSMA portal
JSMA portal
More like this
JSMA session
JSMA session
More like this
JSMA portals
JSMA portals
More like this
JSMA system
JSMA system
More like this