Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #26684 > unrolled thread

addeventlistener quirks

Started byAndrew Poulos <ap_prog@hotmail.com>
First post2015-01-24 17:08 +1100
Last post2015-01-25 15:16 +0100
Articles 5 — 3 participants

Back to article view | Back to comp.lang.javascript


Contents

  addeventlistener quirks Andrew Poulos <ap_prog@hotmail.com> - 2015-01-24 17:08 +1100
    Re: addeventlistener quirks Andrew Poulos <ap_prog@hotmail.com> - 2015-01-24 17:14 +1100
    Re: addeventlistener quirks "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-01-24 18:32 +0100
      Re: addeventlistener quirks Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-25 02:28 +0100
        Re: addeventlistener quirks "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-01-25 15:16 +0100

#26684 — addeventlistener quirks

FromAndrew Poulos <ap_prog@hotmail.com>
Date2015-01-24 17:08 +1100
Subjectaddeventlistener quirks
Message-ID<AdqdnU0rnZXFpV7JnZ2dnUVZ8vudnZ2d@westnet.com.au>
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.

Is the only option to use attachEvent?

Andrew Poulos

[toc] | [next] | [standalone]


#26685

FromAndrew Poulos <ap_prog@hotmail.com>
Date2015-01-24 17:14 +1100
Message-ID<w5udnbwNPsEupF7JnZ2dnUVZ8tmdnZ2d@westnet.com.au>
In reply to#26684
On 24/01/2015 5:08 PM, 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.
>
> Is the only option to use attachEvent?

No, it doesn't matter now :-(

In quirks mode IE won't recognise "new Audio()". Without it the rest is 
moot.

Andrew Poulos

[toc] | [prev] | [next] | [standalone]


#26693

From"Christoph M. Becker" <cmbecker69@arcor.de>
Date2015-01-24 18:32 +0100
Message-ID<ma0ku5$bgj$1@solani.org>
In reply to#26684
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

[toc] | [prev] | [next] | [standalone]


#26696

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2015-01-25 02:28 +0100
Message-ID<1651063.Tygl80MvDv@PointedEars.de>
In reply to#26693
Christoph M. Becker wrote:

> 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, 

<http://ie.microsoft.com/testdrive/ieblog/2011/Mar/24_IE9sDocumentModesandJavaScript_1.png>

“Quirks mode” is not the same as “IE 9 standards” Document Mode, and 
certainly IE 11 in “IE 9 standards” Document Mode is not the same as IE 9 in 
“Quirks mode”.

IE 9 in “Quirks mode” is lower in regard to standards compliance than “IE 7 
standards” Document Mode.  addEventListener() certainly is not available 
there.

One should never rely on that a document only renders correctly when in 
“Quirks mode”.


The light at the end of the tunnel is that there are rumors that Microsoft 
is going to replace Internet Explorer in favor of a lightweight rewrite 
codenamed “Spartan”.  It remains to be seen if this comes true and if the 
result will be in any way more pleasing than what we have today:

<http://www.zdnet.com/article/microsoft-is-building-a-new-browser-as-part-of-its-windows-10-push/>

This fits well with official information that support for IE 8 will be 
discontinued, and for IE 9 and 10 reduced, starting next year:

<http://www.techradar.com/news/internet/web/abandon-ship-microsoft-will-kill-support-for-internet-explorer-8-in-2016-1260907>

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#26698

From"Christoph M. Becker" <cmbecker69@arcor.de>
Date2015-01-25 15:16 +0100
Message-ID<ma2tsp$uei$1@solani.org>
In reply to#26696
Thomas 'PointedEars' Lahn wrote:

> Christoph M. Becker wrote:
> 
>> It seems that IE 11 in IE 9 emulation mode does define the
>> `addEventListener` property of window and elements, 
> 
> <http://ie.microsoft.com/testdrive/ieblog/2011/Mar/24_IE9sDocumentModesandJavaScript_1.png>
> 
> “Quirks mode” is not the same as “IE 9 standards” Document Mode, and 
> certainly IE 11 in “IE 9 standards” Document Mode is not the same as IE 9 in 
> “Quirks mode”.
> 
> IE 9 in “Quirks mode” is lower in regard to standards compliance than “IE 7 
> standards” Document Mode.  addEventListener() certainly is not available 
> there.

Of course, you're right.  I was confused about the value of
document.compatMode, which I thought would be "CSS1Compat" for quirks
mode, while actually it is "BackCompat".  However, as I've just learned[1]:

| As of Internet Explorer 10, quirks mode behaves differently than it
| did in earlier versions of the browser. In Windows Internet Explorer
| 9 and earlier versions, quirks mode restricted the webpage to the
| features supported by Microsoft Internet Explorer 5.5. In Internet
| Explorer 10, quirks mode conforms to the differences specified in the
| HTML5 specification.

> This fits well with official information that support for IE 8 will be 
> discontinued, and for IE 9 and 10 reduced, starting next year:

I'm afraid that IE 8 will stay in widespread use as long as Windows XP does.

[1] <https://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx>

-- 
Christoph M. Becker

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web