Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: comp.lang.javascript Subject: Re: addeventlistener quirks Date: Sat, 24 Jan 2015 18:32:00 +0100 Organization: solani.org Lines: 28 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1422120709 11795 eJwNyMkBgAAIA7CVuFpkHQT2H0HzDJzKN4Ng4HC77Vd47NgbDgM505Y6tSnajT8zWwSeqA8fkhB8 (24 Jan 2015 17:31:49 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sat, 24 Jan 2015 17:31:49 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 X-User-ID: eJwVyMEBwCAIA8CVpJJIx0Eh+49g+7zDpPEsJ+gQxIFOVz9WHUX9K0bkGWS1eu6PzFnvtlW4LwUR2w== In-Reply-To: Cancel-Lock: sha1:QDKH2YTb1d7uiBkfGrV+54F6bpw= X-NNTP-Posting-Host: eJwFwQkBwDAIA0BL5QmscqAQ/xJ2BwuJlx4IB0Gtuhx9BhFpnN5LW/36sN1loqFZmsswHeAHI3URIA== Xref: csiph.com comp.lang.javascript:26693 Andrew Poulos wrote: > The code I've been working on uses addEventListener. The elearning > course I've been building is written in valid HTML5. The client's > Learning Management System (LMS) wraps my course's window in a window of > its own. The LMS seems to "force" IE to render the course in quirks > mode. In quirks mode IE9 gives an error that addEventListener is > unsupported. It seems that IE 11 in IE 9 emulation mode does define the `addEventListener` property of window and elements, as the following console session for a document without doctype demonstrates: > document.compatMode => "CSS1Compat" > window.addEventListener => function addEventListener() { [native code] } > document.body.addEventListener => function addEventListener() { [native code] } Are you sure there is no X-UA-Compatible in place (either HTTP header or meta element)? What do you mean with "wraps my course's window in a window of its own"? An Iframe? -- Christoph M. Becker