Evented

dojo/Evented

Summary

A class that can be used as a mixin or base class, to add on() and emit() methods to a class for listening for events and emitting events:

See the dojo/Evented reference documentation for more information.

Examples

Example 1

define(["dojo/Evented", "dojo/_base/declare", "dojo/Stateful"
], function(Evented, declare, Stateful){
    var EventedStateful = declare([Evented, Stateful], {...});
    var instance = new EventedStateful();
    instance.on("open", function(event){
    ... do something with event
 });

instance.emit("open", {name:"some event", ...});

Methods