ecmascript 5 and the script tag
Allen.Wirfs-Brock at microsoft.com
Fri Apr 17 17:47:13 PDT 2009
>From: Brendan Eich [mailto:brendan at mozilla.com]
>> IE8 does have a form of global object versioning. In IE8 the JSON
>> object and associated toJSON methods, the methods
>> Object.defineProperty and Object.getOwnPropertyDescriptor(they only
>> supports DOM objects in IE8), and a few other minor standards/interp
>> conformance fixes are only provided for pages/iframes operating in
>> "IE8 standards mode" (the default mode). This was a very late
>> change in the IE development cycle a was primarily made in response
>> to user feedback concerning the IE8 release candidate
>> ). We'll see how it works out...
>Sorry, I think you mentioned this and I forgot. But this is an all-or-
>nothing mode, I take it -- not a subjective-programming (ES4
>namespaces) facility where one script might run in IE7 mode and see no
>JSON property on the very same global object on which another script
>in IE8 mode sees the ES5 JSON object. Or so I hope!
That's right, it's an all-or-nothing configuration of the global object and the other built-in objects accessed via it. I would think that a similar interpretation might reasonably be applied to a version specified in the "Content-Script-Type" meta tag.
More information about the es-discuss