Use the following guidelines for eventing:
Parent topic: Best practices for developing widgets
- Use the container communication APIs instead of browser or library abstractions to communicate between gadgets. For example, do not use dojo.publish or dojo.subscribe methods.
- Gadgets are most interoperable when events are limited to strings. The next best method is JSON serialization of a js object into a string.
- Events are always sent asynchronously. Do not assume that the event is received immediately.