Dela via


What’s new in JScript for IE8

During Beta1 and Beta2 pre-releases of IE8, we’ve blogged about the performance optimizations done in the Script engine and the addition of new language features such as native JSON support. We also provided details about the JScript Debugger and the JScript Profiler –that shipped as part IE8 Developer Tools

One of the big pieces of feedback during our beta cycles was for compatibility, which, for JScript, meant focusing on how we version some of the language features we’re adding. As a result, version 5.8 of the JScript engine (shipped as a part of IE8) introduced an opt-in versioning mechanism for all the new and breaking language features. The JScript engine now exposes new language features only when the layout (document) mode is set to “IE8 Standards Mode.” Versioned JScript language features available in this release include native JSON support and accessor methods for enabling Document Object Model prototypes.

In addition to addressing bugs that were reported during the betas and our internal testing, we have added some user requested changes in the developer tools.  A more seamless debugging experience, profiling multi-frame web pages and searching the profile reports using the search bar are some of the cool features we have added.  We think developer tools will make life a whole lot easier for you web developers out there –  we would love to hear your feedback! 

As outlined in the article I wrote in the Code Focus Magazine during beta2, we have made more targeted performance improvements in the JScript engine and the overall AJAX browser stack to improve end-to-end performance of real world applications. On typical AJAX applications such as GMail, commonly used operations have improved over 40% over IE7. 

I would like to thank all of you for your support and feedback through the IE8 product development cycle and hope that you like the JScript enhancements done in IE8.

Shreesh Dubey
Product Unit Manager, JScript

Update 3/25/09 - updating JScript Debugger link

Comments

  • Anonymous
    March 24, 2009
    PingBack from http://www.anith.com/?p=22326

  • Anonymous
    March 24, 2009
    any chance this error: object does not support property or method will ever be fixed to something remotely meaningful? e.g. TELL us WHICH property or method? or WHAT object we were trying to set stuff on.

  • Anonymous
    March 24, 2009
    During Beta1 and Beta2 pre-releases of IE8, we’ve blogged about the performance optimizations done in

  • Anonymous
    March 24, 2009
    The comment has been removed

  • Anonymous
    March 25, 2009
    Will JScript 5.8 be backported to IE7 just as Jscript 5.7 was backported to IE6 (I believe with this was with SP3)?

  • Anonymous
    March 25, 2009
    But on XPSP3, CScript after installing IE8 reports version 5.7 but Windows 7 CScript reports 5.8. Why the inferior treatment to XP WSH JScript?

  • Anonymous
    March 25, 2009
    Stop blogging and go make IE9.

  • Anonymous
    March 25, 2009
    The comment has been removed

  • Anonymous
    March 25, 2009
    The JScript engine now exposes new language features only when the layout (document) mode is set to “IE8 Standards Mode.” So, once again, the default for IE8 is for it to not work properly, unless I explicitly tell it to work properly. Will IE9 default to the IE7 JavaScript feature set too?

  • Anonymous
    March 25, 2009
    @Brian LePore: As of now, there are no plans to back port JScript 5.8 to IE7. @someone: Cscript.exe is not shipped as a part of IE8 but as a part of the Windows OS release. JScript.dll is shipped as a part of both - IE8 and the Windows OS release. So installing IE8 on a machine would upgrade the JScript.dll to version 5.8, but not change the version of Cscript.exe. On the other hand, Win7 ships the incremental version for CScript.exe, which is 5.8 (XPSP3 and Windows Vista shipped v5.7). Win 7 will also ship IE8 and version 5.8 of the JScript.dll. Hence there is no inferior treatment for CScript. GauravS[MSFT]

  • Anonymous
    March 25, 2009
    I'd like to see javascript to start and stop profiles.  This would improve reproducibility when doing performance investigations. I would suggest staying consistent with FireBug: console.profile() console.profileEnd()

  • Anonymous
    March 25, 2009
    @David: pages with strict-mode doctypes will default to IE8 standards mode so they automatically will get these script improvements.  He's NOT saying you need to explicitly use the meta tag (opt-in) to get them. @Jeffrey: I'm sure there's many other IE team members who are doing just that.

  • Anonymous
    March 26, 2009
    @David Owens: I am not sure if I understood this correctly. The default for IE8 will work properly. Let me try to explain this with an example. If a page uses “IE8 Standards” mode, the new JScript features like native JSON support will be enabled. However, if a user already uses some proprietary JSON implementation, which is broken due to the new native JSON support, a user can switch to using a non “IE8 standards” mode till the time he changes the code and starts taking advantage of the native JSON support. This will help a site owner maintain the end user experience and compatibility with IE7. We will post more details around the versioning of JScript features in a follow-up post. Let me know if this still does not address your concern. @ John Booze: Thanks for your feedback. We will consider this for the future release.

  • Anonymous
    March 26, 2009
    The improvements to Javascript are very welcome.  I know I should have thought of this sooner, but I'd really like to be able to access the debugging tools for a Windows Sidebar Gadget. Maybe someone from the IE team could have a brew with someone from the Sidebar team and work something out before Windows 7 Gold?

  • Anonymous
    March 26, 2009
    Sorry, I totally meant JScript.  Same difference, right? Just kidding!

  • Anonymous
    March 27, 2009
    The comment has been removed

  • Anonymous
    March 27, 2009
    Tino, I'm not sure I understand your first point... IE8, Firefox3, Chrome, and Safari 4 all give the same result here. For the second point, per the ECMAScript 3.1 specification and  Mozilla's documentation (developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/substring) when passing a negative subscript argument to substring() it is supposed to be turned into 0. ("If either argument is less than 0 or is NaN, it is treated as if it were 0.") Hence, if /other/ browsers wanted to be more compatible with ECMAScript, they should probably behave more like IE.

  • Anonymous
    March 30, 2009
    @Tino: Thanks for your feedback. The first issue has been fixed in IE8. However, being a breaking change, the support for the same is available only when you launch the JScript engine in v5.8 mode i.e. in the “Internet Explorer 8 Standards”. You could read more about how to choose the layout mode here - http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx. We will take a look at the second deviation that you pointed out for the next release. GauravS[MSFT]

  • Anonymous
    April 02, 2009
    GauravS: Will IE8 browsers running in the IE7 Standards Document Mode benefit from the new JScript performance gains or will they be limited to the IE7 JScript performance?  Thanks in advance for your time.

  • Anonymous
    April 02, 2009
    こんばんは。五寳です。 すでに IEBlog を読まれた方もいらっしゃるかと思いますが、IE8 RC から RTW にかけて、JScript に変更が入りました。 IEBlog でも JScript Blog

  • Anonymous
    April 05, 2009
    @Dan, GauravS: There are two distinct string methods that function differently: substr and substring. Tino referenced substr while Dan referenced the other (substring). https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/substr https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/substring var sub = string.substr(start[, length]); Quoting the link above: "If start is negative, substr uses it as a character index from the end of the string. If start is negative and abs(start) is larger than the length of the string, substr uses 0 as the start index. Note: the described handling of negative values of the start argument is not supported by Microsoft JScript."

  • Anonymous
    April 05, 2009
    fearphage, point to where it says that's a legal syntax (for either method) in the ECMAScript standard, then we'll talk.

  • Anonymous
    April 05, 2009
    I'll also point out that the "parameters" section of the substr method in Mozilla's documentation precludes the use of negative numbers: "Location at which to begin extracting characters (an integer between 0 and one less than the length of the string)."

  • Anonymous
    June 16, 2009
    少し前の話になりますが、6月6日のVSUG Dayにて、開発者のInternet Explorer 8対応について話をさせていただきました。 そのフォローアップとして少し情報を記述しておきます。 [その1]IE8のイントラネットでのレンダリングモードはIE8互換モード(IE7同等)