-
-
Save ziesemer/2985342 to your computer and use it in GitHub Desktop.
http://stackoverflow.com/questions/6631637/how-to-get-reference-to-xul-iframe-that-contains-a-window , http://stackoverflow.com/questions/11174359/how-to-properly-receive-the-domcontentloaded-event-from-an-xul-iframe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?> | |
<window id="foo" orient="vertical" | |
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> | |
<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) | |
return; | |
// doStuffWith(this.contentWindow); | |
}, true); | |
iframe.setAttribute("src", "http://www.google.com/"); | |
} | |
]]></script> | |
<iframe id="foo-iframe" type="content"/> | |
</window> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is all I see:

(No alert pop-up.)