I'm using the sample app Projection found here, which allows me to have one main app window open, and display on my second monitor some other stuff.
Now what I want is for the javascript between the two windows to have some way of sharing state or passing messages. In scenario1.js, the code to start the new window looks like this:
var view = window.open("ms-appx:///html/secondaryView.html", null, "msHideView=yes");
Now I know for a fact that this variable has a view.postMessage()
function, but in the javascript for the new window (secondaryView.js), I don't know how to listen for the message. I also don't know if there's any other obvious way of sharing state that I haven't thought of, between the two windows.
[edit] The localStorage solution provided in here is fine and works, but isn't as good as using view.postMessage