#12 ✓resolved
Aman Gupta

DOMElement addEventListener is broken

Reported by Aman Gupta | January 10th, 2009 @ 06:46 PM

DOMElement.prototype = new DOMNode;
__extend__(DOMElement.prototype, {
    addEventListener:     window.addEventListener,
    removeEventListener:  window.removeEventListener,
    dispatchEvent:        window.dispatchEvent,

is defined before $w (event.js) is included into ext.js, so these functions do not exist.

could either change the ordering, or make wrapper functions instead:

DOMElement.prototype = new DOMNode;
__extend__(DOMElement.prototype, {
    addEventListener:     function(){ window.addEventListener.apply(window, arguments) },
    removeEventListener:  window.removeEventListener,
    dispatchEvent:        window.dispatchEvent,

DOMDocument also has similar pointers, and also to attachEvent/detachEvent

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

a javascript browser environment

People watching this ticket

Pages