internet explorer - jQuery 2.x issue on addEventListener while using Microsoft Web Browser OCX control -


i using ie ocx on progress abl container , has forced emulation of ie10 adding new dword entry on windows registry(on feature_browser_emulation). web file want open on embedded browser includes jquery version 2.2.4 , getting script error:

line: 3573 [document.addeventlistener( "domcontentloaded", completed );],
char: 4,
error: object doesn't support property or method 'addeventlistener'
code: 0,
url: filepath/jquery-2.2.4.js.

the same error persists if force emulation of ie11 , use jquery 2.x. no error if use jquery 1.12.4. emulated version correct. issue of microsoft web browser ocx? have ie11 on machine.

any appreciated! thank you!!

the feature_browser_emulation change useragent. found doctype specification on old webpages this:
<!doctype html public "-//w3c//dtd html 4.01 transitional//en"> compelling browser render page in quirks mode , hence error on jquery occured. found 3 ways resolve issue (to ensure standard mode):

  1. using <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd">
  2. using '<!doctype html>' , following html5 standards new webpages
  3. specifying metatag:<meta http-equiv="x-ua-compatible" content="ie=edge">

this quite helpful: doctype overview


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -