locked
how to pass object using InvokeScriptAsync in webview?

    Question

  • I have a object which I need to pass from my application to page in webview . Unfortunately I can't serialize that object.

    is there any other way to do so?

    Tuesday, May 20, 2014 1:02 PM

Answers

  • No, the app and the Webview run in isolated script contexts, thus you are limited to passing information as string properties of the args object given to invokeScriptAsync. This is by design for security reasons, with no means to bypass it; otherwise you open the potential for malicious code in a Webview to directly modify app objects.

    Kraig

    Author, Programming Windows Store Apps with HTML, CSS, and JavaScript, Second Edition, a free ebook from Microsoft Press.


    Tuesday, May 20, 2014 2:55 PM