Issues with Developer Tools (IE 11) - "Error: Object doesn't support property or method 'addEventListener'"

Kent Sharkey picture Kent Sharkey · Dec 30, 2014 · Viewed 15.2k times · Source

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.

Answer

Sampson picture Sampson · Dec 31, 2014

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)":

enter image description here

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.