Skip to main content

Bug Tracker

Side navigation

#11127 closed bug (invalid)

Opened January 04, 2012 12:24PM UTC

Closed January 19, 2012 08:13AM UTC

Last modified April 30, 2013 09:43AM UTC

object doesn't support property or method "addEventListener"

Reported by: inVader Owned by: inVader
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:
Description

object doesn't support property or method "addEventListener"

jquery-1.7.1.js, line 464 symbol 4

IE 9.0, Windows 7

Could be fixed by changing line 459 to

if ( document.addEventListener && window.addEventListener ) {

next error is

object doesn't support property or method "removeEventListener"

jquery-1.7.1.js, line 922 symbol 3

Could be fixed by changing line 920 to

if ( document.removeEventListener ) {

Attachments (0)
Change History (4)

Changed January 04, 2012 12:44PM UTC by inVader <valery.latushko@gmail.com> comment:1

this bug exists since jquery-1.4

jquery-1.3.2 doesn't have this bug

Changed January 04, 2012 01:33PM UTC by rwaldron comment:2

owner: → inVader
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate:  http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.

Changed January 19, 2012 08:13AM UTC by trac-o-bot comment:3

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Changed April 30, 2013 09:43AM UTC by anonymous comment:4

This bug cannot be reproduced in JSFiddle, because it only appears to happen in MSIE compatability mode which JSFiddle itself doesn't support.

the error is thrown from JQuery.ready.promise, to reproduce open Internet Explorer, use $(document).ready( fn ), open dev console (F12) and set the Document mode to IE7 Standards. I'm using JQuery edge in my tests:

jQuery.ready.promise = function( obj ) {

if ( !readyList ) {

readyList = jQuery.Deferred();

if ( document.readyState === "complete" ) {

setTimeout( jQuery.ready );

} else {

[ERROR Thrown here]

document.addEventListener( "DOMContentLoaded", completed, false );

window.addEventListener( "load", completed, false );

}

}

return readyList.promise( obj );

};