1

It says - Object doesn't support property or method 'addEventListener'. - jquery-1.11.1.min.js - jquery-migrate-1.4.1.js

I'm using client base application (https://www.clientbaseonline.com), which is supported only by Internet Explorer.

Everything works fine chrome and IE-11 as well but when I run the project in client base application which is kinda i-frame of IE 11, I get the above error.

I have tried this fix but it doesn't work.

Please help me with this. Thanks!

parth joshi
  • 157
  • 1
  • 4
  • 13

2 Answers2

4

What document mode are you in?

If you press F12 what do you see in the emulation tab? enter image description here

If you aren't in at least docmode 9, you don't have access to that.

Take a look at this stackoverflow post about addEventListent

So if you are using a XUA Compatible Meta tag, then you need to check to see if you are running in either Compatibility View or EnterpriseMode, as they can take precedence over the meta tag.

The good thing about the emulation tab in the console is it will tell you WHY you are in a specific document mode. If you are in Enterprise mode, you will need an exception to your sitelist.xml. Or if you are in Compatibility View. You will need to edit the settings. Hold alt then click on the tools menu. Then select compatibility view and remove the site from the list. enter image description here

Alexander Ryan Baggett
  • 2,347
  • 4
  • 34
  • 61
0

Thanks Alex for you help! It did helped when I got my mode to turn "Edge" which actually was not default(default was 9). I also added this meta tag <meta http-equiv="x-ua-compatible" content="IE=edge"> before in my site.master.

But Then I read somewhere that I have to put that meta tag at top of the all the meta's and just after the title in . So now its working fine even though I don't turn my compatibility mode to Edge. Obviously the mate tag overrides the mode. Still issue arises when using jquery 3.2.1 (latest) and got working in jquery version 3.2.0.

Strange! If any one has view to share please acknowledge here.

parth joshi
  • 157
  • 1
  • 4
  • 13
  • Is addEventListener working now for you? The jQuery thing sounds like a separate issue. People can help you with the jQuery issue as a separate question. It would be especially helpful if you had error messages where it failing from the console for us to read. – Alexander Ryan Baggett Dec 13 '17 at 16:34
  • yes its working now, after I put meta tag just after title tag and use JQuery 3.2.0 and JQuery migrate 1.4.1. But when I use JQuery 3.2.1(latest) and migrate 3.0.1(latest) its again showing me errors related to JQuery and then addEventListener issue arises again. – parth joshi Dec 14 '17 at 08:03