Skip to content

Instantly share code, notes, and snippets.

@kmaglione
Created June 24, 2012 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kmaglione/2985266 to your computer and use it in GitHub Desktop.
Save kmaglione/2985266 to your computer and use it in GitHub Desktop.
<?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) {
if (this != event.originalTarget)
return;
doStuffWith(this.contentWindow);
}, true);
iframe.src = "http://www.google.com/";
}
]]></script>
<iframe id="foo-iframe" type="content"/>
</window>
<!-- vim: set sw=2 sts=2 et: -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment