detaches a handler from an event (which was attached before by the on() method)
name | string | the name of event to detach |
context | any | a context marker |
vault.events.on("UploadComplete", function(files) {
console.log(files);
});
vault.events.detach("UploadComplete");
By default detach() removes all event handlers from the target event. You can detach particular event handlers by using the context marker.
var marker = "any"; // you can use any string|object value
vault.events.on("UploadComplete", handler1);
vault.events.on("UploadComplete", handler2, marker);
// the next command will delete only handler2
vault.events.detach("UploadComplete", marker);