Skip to content

Instantly share code, notes, and snippets.

@the8472
Created October 23, 2014 18:44
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 the8472/17fe1df85a7f3b3802ff to your computer and use it in GitHub Desktop.
Save the8472/17fe1df85a7f3b3802ff to your computer and use it in GitHub Desktop.
buildView: function() {
let window = windowUtils.getMostRecentBrowserWindow();
let doc = window.document;
let content = doc.getElementById("appcontent");
let splitter = doc.createElementNS(XUL_NS, 'splitter');
splitter.setAttribute("resizeafter","closest")
splitter.setAttribute("resizebefore","closest")
content.appendChild(splitter)
let iframe = doc.createElementNS(XUL_NS, 'iframe');
iframe.setAttribute('type', 'chrome');
iframe.setAttribute("flex",1)
iframe.setAttribute("src",this.options.contentURL)
content.appendChild(iframe);
iframe.addEventListener("DOMContentLoaded", e => {
let contentWindow = e.target.ownerGlobal
this.initContent(contentWindow)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment