locked
Promise from WinJS.xhr doesn't include loaded and total?

    Question

  • Since the promise progressevent from WinJS.xhr doesn't have a property for loaded and total, do we need to use the XmlHttpRequest method if we are using something liker the the Progress Bar?  Or am I missing something?

    S


    Check out my new C# 2010 All In One for Dummies book at Amazon!

    Wednesday, May 23, 2012 3:21 PM

Answers

  • Hi Bill,

    When the promise is .done then it has loaded.  The promise also give you progress in the form of readystate changed.  The XMLHttpRequest is returned in the promise so you have access to all the properties of that object as well.

    See line 1850 of base.js for the definition of the promise.

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, May 23, 2012 7:24 PM
    Moderator

All replies

  • Hi Bill,

    When the promise is .done then it has loaded.  The promise also give you progress in the form of readystate changed.  The XMLHttpRequest is returned in the promise so you have access to all the properties of that object as well.

    See line 1850 of base.js for the definition of the promise.

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, May 23, 2012 7:24 PM
    Moderator
  • Thanks, Jeff. I'll dig into that to see what I can learn.

    Check out my new C# 2010 All In One for Dummies book at Amazon!

    Thursday, May 24, 2012 5:49 PM