I know it's too late for a proposal, but I keep wanting a couple of
things for AOP stuff.
One is a newApply
Creational = {
getByNode : function(el){
if(!this.hasOwnProperty("instances")) this.instances = {};
return this.instances.hasOwnProperty(el.id) && this.instances[el.id] ||
(this.instances[el.id] = this.new.apply(arguments)); // <-- Fictitious
syntax.
}
}
function Widget(el, dir){
}
Wiget.getByNode = Creational.getByNode; // Borrow the getByNode method
So that way, I can have a Widget based on a node, yet still pass
varargs to the constructor.
Garrett
--
Programming is a collaborative art.
_______________________________________________
Es4-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es4-discuss