support of msSaveBlob in win8 app store RRS feed

  • Question

  • I'm creating javascript/html app wor win8 store which should be able to save generated data. 

    To save text data to file I use:

                    var bb = new MSBlobBuilder();
                    var blob = bb.getBlob("text/plain");
                    window.navigator.msSaveBlob(blob, 'fname.txt');

    To save image I use:

                    var canvas = document.createElement('canvas');
                    canvas.width = img.width;
                    canvas.height = img.height;
                    var ctx = canvas.getContext('2d');
                    ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
                    window.navigator.msSaveBlob(canvas.msToBlob(), 'fileName.png');

    These parts of code work well in IE11.

    But when I ran my code via Visual Studio I've got an error: 0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'msSaveBlob'

    How to solve this problem?

    Thursday, March 27, 2014 10:40 AM


  • I'd love to tell you there's something we can do, it appears that the API simply isn't supported.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Marked as answer by Anne Jing Friday, April 4, 2014 8:13 AM
    Thursday, March 27, 2014 2:59 PM