Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 387
Kent Sharkey Avatar asked Mar 17 '23 12:03

Kent Sharkey


1 Answers

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.

like image 148
Sampson Avatar answered Apr 27 '23 08:04

Sampson