Highlight

2013-10-03

IE8 is Evil.

>>var d = {1:"one", 2:"two",}
  "Expected identifier, string or number"
But that works in IE9's IE8 mode!

Fortunately IE10 does reproduce this bug; too bad IE9 won't upgrade on this Windows 7 machine due to DLL hell. Good thing i have remote desktops:
>>var d = {1:"one", 2:"two"}
undefined
>>d
{...}
That also works in IE8. Bug solved!

But wait, there's more! IE10's IE8 mode happily skips over
var approved_headcount = {
 "ICT": {201301: 1, 201302: 2, 2013.03: 3, 201304: 1, 201305: 2, 201306: 3},
 "Finance": {201301: 1, 201302: 2, 201303: 3, 201304: 1, 201305: 2, 201306: 3},
}
and is thus buggy at being buggy.

I guess they incinerated the IE8 parser as it also returns incorrect line numbers while parsing that code block.

1 comment:

  1. http://www.modern.ie/en-us/f12

    Can I use document modes instead of testing new sites in older versions of IE?

    Document Mode is only an approximation to the actual behavior of older versions of Internet Explorer, and should not be used to determine whether a site works properly in an older browser. Instead, developers should test with actual copies of the browsers they wish to support. Microsoft makes free virtual machine images available across platforms and can be downloaded at Virtual Machine Downloads: http://www.modern.ie/en-us/virtualization-tools/

    For best performance and feature availability, web developers should use Edge mode to render all their pages. Compatibility problems that require older document modes are often due to CSS hacks or use of older JavaScript libraries. See Code with Standards for a list of best practices that avoid compatibility issues: http://www.modern.ie/en-us/category/code-with-standards

    ReplyDelete