Attaches a handler to an event. For more information and examples, refer to the bind API reference.

Example - subscribe to an event

var observable = new{ name: "John Doe" });
observable.bind("change", function(e) {
    console.log(e.field); // will output the changed field once the event is raised
observable.set("name", "Jane Doe"); // raises the "change" event and the handler outputs "name"
In this article
Not finding the help you need? Improve this article