Issues with Developer Tools (IE 11) - "Error: Object doesn't support property or method 'addEventListener'"
It sounds like you are being thrown into a legacy document mode, before addEventListener
support was available natively in Internet Explorer (version 9).
With your developer tools opened, look to the top-right to identify which document mode is presently being used. If the mode is being switched after the document loads you will see the original document mode suffixed with the string "(default)"
:
It may be the case that you unintentionally switched the document to an older document mode. Alternatively, it may be that the document itself (using an x-ua-compatible
header or meta tag) put itself into an older document mode (that, or malformed markup did it).
One additional thing to look at would be the Compatibility View Settings if they apply. Intranet sites are often times, by default, displayed in Quirks mode which may render the results you're seeing.
Kent Sharkey
Updated on June 17, 2022Comments
-
Kent Sharkey almost 2 years
If I try to open developer tools in IE11, it re-opens the page, zoomed in (and losing any focus/selected element). If I then close the developer tools, it throws a "Error: Object doesn't support property or method 'addEventListener'" error, and the space at the bottom of the page where the dev tools were is unpainted, but empty.
-
Escher about 9 yearsSo to clarify, put
<meta http-equiv="x-ua-compatible" content="IE=edge">
in your<head>
after your charset tag but BEFORE the othermeta
s. I had a hell of a time getting my latest Bootstrap3 web app to work on my colleagues' computers until I discovered this. Goodness knows why, but IE goes: "Oh, you want to use jquery? Then I'm going to render this page as if it were 2006." Edit: also, to get even greater backward compatibilty, you can try reverting to an earlier version of jquery (one of the 1.x versions).