The minimessage
library
enables the developer to display a message window to a user.
This is a valuable feature when you’re trying to obtain user input or
display status messages to a user that autodismiss after a short
interval.
To integrate this feature, take the following steps:
Within the
ModulePrefs
node of the gadget spec file, add aRequire
element to enable theminimessage
JavaScript library.Include:
<Require feature="minimessage"/>
Within the gadget JavaScript layer, insert an initialization function for the mini-message features.
Method call:
var message = new gadgets.MiniMessage(__MODULE_ID__);
When you wish to create a new message window, call one of three message window request methods.
As noted in step 3, there are three different message types that a gadget implementer may specify:
Moving from basic concepts into functional examples, next we’ll explore how to build and customize message windows using the available JavaScript library methods.
Get Programming Social Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.