search for: eventobjectemulation

Displaying 1 result from an estimated 1 matches for "eventobjectemulation".

2006 Jun 15
3
RE: Yahoo!-like Eventobjectemulation/abstractioninPrototype?
This is obviously rough draft and not thoroughly tested, but it seems to work. If you''d like, give it a try (load it after you load prototype.js): Function.prototype.bindAsEventListener = function(object) { var __method = this; return function(event) { return __method.call(object, new SuperEvent(event || window.event)); } } var SuperEvent = Class.create();