Ticket #4 (closed enhancement: duplicate)

Opened 3 years ago

Last modified 2 years ago

event listener API

Reported by: bob Assigned to: bob
Priority: normal Milestone:
Component: component1 Version:
Severity: normal Keywords: MochiKit.DOM
Cc:

Description

http://groups.google.com/group/mochikit/browse_frm/thread/5d8b6673fda3c640/844d050c926a0eb7#844d050c926a0eb7

MochiKit.DOM.asEventListener = function (func) { 
     return function (e) { 
         func.call(this, e || event); 
     }; 

}; 

MochiKit.DOM.addEventListener = function (element, action, func) { 
     var listener = MochiKit.DOM.asEventListener(f unc); 
     element = MochiKit.DOM.getElement(elemen t); 
     if (element.addEventListener) { 
         element.addEventListener(actio n, listener, false); 
     } else if (element.attachEvent) { 
         element.attachEvent("on" + action, listener); 
     } 
     return listener; 
}; 

Change History

08/31/05 10:51:11 changed by anonymous

  • summary changed from to event listener API.

11/20/05 07:59:56 changed by Thomas

It's still not in MochiKit, could it be possible to have it in the next release ? No further comments on code, it works perfectly for me.

02/07/06 10:56:06 changed by bob@redivi.com

  • status changed from new to closed.
  • resolution set to duplicate.

This will be taken care of with Signal