third_party_iframe1.html 652 B

1234567891011121314151617181920212223242526272829
  1. <!--
  2. Any copyright is dedicated to the Public Domain.
  3. http://creativecommons.org/publicdomain/zero/1.0/
  4. -->
  5. <html>
  6. <head>
  7. <title>Indexed Database Test</title>
  8. <script type="text/javascript;version=1.7">
  9. function messageListener(event) {
  10. let message = eval(event.data);
  11. if (message.source == "parent") {
  12. document.getElementById("iframe2").src = message.href;
  13. }
  14. else if (message.source == "iframe") {
  15. parent.postMessage(event.data, "*");
  16. }
  17. }
  18. </script>
  19. </head>
  20. <body onload="window.addEventListener('message', messageListener, false);">
  21. <iframe id="iframe2"></iframe>
  22. </body>
  23. </html>