Open
Description
I think it would be a good idea that Iris had self.one/iris.one methods that behave similarly to how JQuery one method does.
This would avoid omissions and simplify subscription to events in which we are interested in their first occurrence.
I think it would be easy to do. Something like this:
iris.one = function(p_eventName, f_func) {
function f () {
f_func(arguments);
iris.off(p_eventName,f);
}
iris.on(p_eventName,f);
};
Perhaps the tricky part is to reimplement the iris.off method.
Metadata
Metadata
Assignees
Labels
No labels