Displaying a message to your gadget users is a great way to inform them of pertinent changes, upsell items for in-app purchases, and more. Many times, you’ll want to position those windows in a specific spot in your application to prevent the default pop-up location from being used and supplemental content from being covered.
There are a few methods available for positioning single windows or all windows at once.
If you have multiple mini-message windows that you want to position at different locations, or if you only have a single message in the gadget that you would like to position, then it may be easiest to position one window at a time.
In addition to allowing plain text for the content of a message
createDismissibleMessage() method also
accepts a DOM node reference that denotes the window’s HTML-based
Again taking the dismissible message gadget sample as our
foundation, we can change the
Content section to dictate the position on
the page that a message window should be displayed, based on where the
DOM node is placed: