events
events copied to clipboard
Feature request: Return `callback` function on methods.
Feature request: Return callback
function on methods.
If we turn off a listener, it requires type, selector, callback
right? In this case, we write same function again and again.
For example:
events.on("click", "document", function(){
return "Hello!";
});
...
events.off("click", "document", function(){
return "Hello!";
});
If the on()
method give us callback function, we use it again and again.
Example:
callback = events.on("click", "document", function(){
return "Hello!";
});
...
events.off("click", "document", callback);
In this case, you just add return callback;
end of methods.