ASDSO Dam Safety Toolbox

Template: WhatLinksHere: Difference between revisions

From ASDSO Dam Safety Toolbox
Jump to: navigation, search
No edit summary
No edit summary
Line 36: Line 36:


     document.querySelector("iframe").addEventListener("click", function(e){
     document.querySelector("iframe").addEventListener("click", function(e){
      console.log("here");
       var iframeWin = document.getElementById("iframeWin");
       var iframeWin = document.getElementById("iframeWin");
       iframeWin.contentWindow.postMessage(null, 'https://your-second-site.example');
       iframeWin.contentWindow.postMessage(null, 'https://your-second-site.example');
Line 41: Line 42:


     window.addEventListener('message', event => {
     window.addEventListener('message', event => {
      console.log("no here");
       console.log(event);
       console.log(event);
       console.log(event.origin);
       console.log(event.origin);

Revision as of 15:18, 7 July 2023

Usage