私は、ローカル コンテキストにページがあるプログラムを持っています。このページ内には、そのコンテンツが Web コンテキストにある iframe があります。ここで、ローカル コンテキストから Web コンテキストにデータを送信したいと思います。これを行うにはどうすればよいですか。
ローカル
var node = document.createElement("iframe");
node.src = 'ms-appx-web:///pages/mapView/mapView.html?latitude=' + coordinates.latitude + '&longitude=' + coordinates.longitude;
node.style.width = '100%';
node.style.height = '100%';
node.onload = function () {
node.contentWindow.postMessage(JSON.stringify(data), "ms-wwa-web://" +
document.location.host);
}
document.querySelector('#insert').appendChild(node);
私が行うiframeで:
window.addEventListener('message', receiveMsg, false);
データを取得した ajax 呼び出しがありますが、Web コンテキストで ajax 呼び出しにアクセスできないため、ここからデータを mapView.html に送信したいと考えています。
問題は。Get Parameter を介していくつかの値を送信しますが、そのためのデータが多すぎます。
助けはありますか?