JSFiddle - React, Tailwind, and code Playground

by jonahe

JavaScript

let windowRef = window.open('', 'popUpWindow',
                  'height=' + 600 +
                  ',width=' + 800 +
                  ',left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes');

window.addEventListener("message", function(event) {
  if (event.origin != 'https://funkis.test.quiddity.se') {
    // something from an unknown domain, let's ignore it
    return;
  }

  alert( "received: " + event.data );

  // can message back using event.source.postMessage(...)
});