use the postMessage function<\/a>.<\/strong><\/p>\nIn the page displayed by the Windows8 App in an iframe, just call the postMessage<\/strong> on the window to send a message to the app. Don’t forget to set the origin to “*”:
\n[javascript]window.parent.postMessage("this is a messsage very important","*");[\/javascript]<\/p>\n In the windows 8 app, you can register to this kind of message with a very classic code. Also,you can check the origin field to be sure that the message comes from your web site<\/strong>.
\n[javascript]
\nwindow.addEventListener("message", messageReceived, false);<\/p>\nfunction receiveMessage(e) {
\n if (e.origin === "http:\/\/jonathanantoine.com") {<\/p>\n
}
\n};[\/javascript]<\/p>\n","protected":false},"excerpt":{"rendered":"
Sometimes, you display information in an iframe and you need to communicate it back to your Windows 8 app. You may think like I did “just navigate to a specific page with the arguments in…<\/p>\n","protected":false},"author":3,"featured_media":1271,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[28],"tags":[],"_links":{"self":[{"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/posts\/1266"}],"collection":[{"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/comments?post=1266"}],"version-history":[{"count":7,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/posts\/1266\/revisions"}],"predecessor-version":[{"id":1274,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/posts\/1266\/revisions\/1274"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/media\/1271"}],"wp:attachment":[{"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/media?parent=1266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/categories?post=1266"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/tags?post=1266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}