bug 832920 reduced test case
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
let emptyXULWindowURL = 'data:text/xml;charset=utf-8,<?xml version="1.0"?><?xml-stylesheet href="chrome://global/skin/" type="text/css"?><window width="300" height="500" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">CONTENT</window>'; | |
let innerSRC = '<style xmlns="http://www.w3.org/1999/xhtml">label {opacity: 0.2;transition:500ms}label:hover {opacity: 1;}</style><label>over me</label><button label="swap"/>'; | |
let innerURL = encodeURI(emptyXULWindowURL.replace("CONTENT", innerSRC)); | |
let host2SRC = '<label value="host2"/><iframe flex="1" src="about:blank"/>'; | |
let host2URL = encodeURI(emptyXULWindowURL.replace("CONTENT", host2SRC)); | |
let iframe1 = document.createElement("iframe"); | |
iframe1.setAttribute("src", innerURL); | |
iframe1.setAttribute("flex", "1"); | |
iframe1.addEventListener("load", function() { | |
let button = iframe1.contentDocument.querySelector("button"); | |
button.onclick = function() { | |
let iframe2 = win2.document.querySelector("iframe"); | |
iframe1.QueryInterface(Components.interfaces.nsIFrameLoaderOwner); | |
iframe1.swapFrameLoaders(iframe2); | |
} | |
}, true); | |
gBrowser.getNotificationBox().appendChild(iframe1); | |
let win2 = Services.ww.openWindow(null, host2URL, "_blank", "chrome,width=400,height=400", null); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment