search for: superevent

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

Did you mean: superagent
2006 Jun 15
3
RE: Yahoo!-like Eventobjectemulation/abstractioninPrototype?
...s 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(); Object.extend(SuperEvent.prototype, { initialize: function (event) { for (attr in event) { this[attr] = event[attr]; } this.target = Event.element(event); this.srcElement = Event.element(event); this.wh...