document.onclick = () => { setTimeout(() => { open('about:blank') , 1000}) }
Browser | result |
---|---|
Chrome | X |
Firefox | X |
Edge | X |
IE | O |
document.onclick = () => { setTimeout(() => { setTimeout(() => {open('about:blank');}) }) }
Browser | result |
---|---|
Chrome | O |
Firefox | O |
Edge | X |
IE | O |
document.onclick = () => { postMessage("popup", "*") };
addEventListener("message", (evt) => { if (evt.data === "popup") { open('about:blank'); } });
Browser | result |
---|---|
Chrome | X |
Firefox | O |
Edge | X |
IE | O |
var eventTarget = document.createElement('div');
eventTarget.addEventListener("customEvent", () => { open('about:blank'); });
document.onclick = () => { eventTarget.dispatchEvent(new CustomEvent('customEvent')) };
Browser | result |
---|---|
Chrome | X |
Firefox | X |
Edge | X |
IE | X |