Create a gist now

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="foo" orient="vertical"
<script type="application/javascript"><![CDATA[
onload = function onload(event) {
let iframe = document.getElementById("foo-iframe");
iframe.addEventListener("DOMContentLoaded", function (event) {
alert("You'll never see me - but no one knows why...");
if (this != event.originalTarget)
// doStuffWith(this.contentWindow);
}, true);
iframe.setAttribute("src", "");
<iframe id="foo-iframe" type="content"/>

This is all I see:

(No alert pop-up.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment