Skip to content

Instantly share code, notes, and snippets.

@Gozala
Created December 11, 2013 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gozala/7917694 to your computer and use it in GitHub Desktop.
Save Gozala/7917694 to your computer and use it in GitHub Desktop.
let XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
let HTML_NS = "http://www.w3.org/1999/xhtml";
let toolbar = document.createElementNS(XUL_NS, "toolbar");
toolbar.setAttribute("collapsed", false);
toolbar.setAttribute("style", "height: 80px;");
let toolbox = document.getElementById("navigator-toolbox");
toolbox.appendChild(toolbar);
let iframe = document.createElementNS(HTML_NS, "iframe");
iframe.setAttribute("srcdoc", "<iframe src='resource:///chrome/browser/content/browser/aboutRobots.xhtml'/>");
//iframe.setAttribute("src", "resource:///chrome/browser/content/browser/aboutRobots.xhtml")
// type isn't recognized by HTML iframes so we set a sandbox instead.
// iframe.setAttribute("type", "content");
//iframe.setAttribute("sandbox", "allow-scripts ");
iframe.setAttribute("mozbrowser", "");
//iframe.setAttribute("mozframetype", "content")
// transparen isn't recognized by HTML iframes so we set seamless instead.
// iframe.setAttribute("transparent", true);
iframe.setAttribute("seamless", "");
toolbar.appendChild(iframe);
// Security Error: Content at about:srcdoc may not load or link to resource:///chrome/browser/content/browser/aboutRobots.xhtml.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment