Template: WhatLinksHere: Difference between revisions
From ASDSO Dam Safety Toolbox
No edit summary |
No edit summary |
||
Line 35: | Line 35: | ||
} | } | ||
window.parent.postMessage('Hello Parent Frame!', '*'); | |||
window.addEventListener('message', receiveMessage, false); | |||
function receiveMessage(evt) | |||
{ | |||
console.log("here"); | |||
console.log(evt); | |||
// if (evt.origin === 'http://my.iframe.org') | |||
// { | |||
// alert("got message: "+evt.data); | |||
// } | |||
} | |||
</script> | </script> | ||
</html> | </html> |
Revision as of 16:07, 7 July 2023
Usage