locked
Latest version of jquery (1.9.1) crashes app RRS feed

  • Question

  • Here's the error.  I used an older version (1.7.2) that's got everything I need and things seem to be fine; just thought I'd alert folks in case anyone is having the same issue.

    http://asetniop.com/Random/VSError.png

    • Changed type Song Tian Tuesday, March 5, 2013 7:20 AM
    Wednesday, February 27, 2013 9:10 PM

Answers

  • I'd recommend jQuery 2.0 for use in a Windows 8 JS/HTML app. It's unlikely that jQuery 1.9.x will work out of the box in these situations because it needs to do feature detects for IE 6/7/8 that are incompatible with the rules for Windows 8 apps. jQuery 2.0 is meant for these situations.

    jQuery 2.0 is in beta but that doesn't mean much as far as features or stability is concerned. Remember that GMail was in beta for several years. A new 2.0 beta should be out within a few days, watch the blog.

    http://blog.jquery.com/2013/01/15/jquery-1-9-final-jquery-2-0-beta-migrate-final-released/

    • Marked as answer by Song Tian Tuesday, March 5, 2013 7:20 AM
    Thursday, February 28, 2013 12:00 AM
  • Hi Zack-ASETNIOP,


    For Windows Store app with javascript, there are some limitation on some scripting code such as directly modifying the inner HTML of certain UI elements. As the error dialog you posted has indicated, the problem you encounter is possibly caused by the certain JQuery API is directly accessing the inner html of certain elements. You can try wrapping the jquery method call with the "MsApp.execUnsafeLocalFunction" method to see if it helps:


    #execUnsafeLocalFunction method (Windows)
    http://msdn.microsoft.com/en-us/library/windows/apps/Hh767331.aspx


    #Developing secure apps (Windows)
    http://msdn.microsoft.com/en-us/library/windows/apps/hh849625.aspx


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Song Tian Tuesday, March 5, 2013 7:20 AM
    Monday, March 4, 2013 4:04 AM
    Moderator

All replies

  • I'd recommend jQuery 2.0 for use in a Windows 8 JS/HTML app. It's unlikely that jQuery 1.9.x will work out of the box in these situations because it needs to do feature detects for IE 6/7/8 that are incompatible with the rules for Windows 8 apps. jQuery 2.0 is meant for these situations.

    jQuery 2.0 is in beta but that doesn't mean much as far as features or stability is concerned. Remember that GMail was in beta for several years. A new 2.0 beta should be out within a few days, watch the blog.

    http://blog.jquery.com/2013/01/15/jquery-1-9-final-jquery-2-0-beta-migrate-final-released/

    • Marked as answer by Song Tian Tuesday, March 5, 2013 7:20 AM
    Thursday, February 28, 2013 12:00 AM
  • Hi Zack-ASETNIOP,


    For Windows Store app with javascript, there are some limitation on some scripting code such as directly modifying the inner HTML of certain UI elements. As the error dialog you posted has indicated, the problem you encounter is possibly caused by the certain JQuery API is directly accessing the inner html of certain elements. You can try wrapping the jquery method call with the "MsApp.execUnsafeLocalFunction" method to see if it helps:


    #execUnsafeLocalFunction method (Windows)
    http://msdn.microsoft.com/en-us/library/windows/apps/Hh767331.aspx


    #Developing secure apps (Windows)
    http://msdn.microsoft.com/en-us/library/windows/apps/hh849625.aspx


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Song Tian Tuesday, March 5, 2013 7:20 AM
    Monday, March 4, 2013 4:04 AM
    Moderator