|
I'm having
issues with the following code: this.document = Components.classes["@mozilla.org/xul/xul-document;1"].createInstance(Components.interfaces.nsIDOMDocument); this.document = this.document.implementation.createDocument("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "overlay", null); this.toolbar = this.document.createDocumentFragment(); // // Append a bunch of button nodes to this.toolbar... // Since this code is in a JS XPCOM object I must create the document object manually (this.document) and then use createDocument to create a real document node (see next paragraph). When I append the button nodes in this.toolbar to any node in the chrome, they all come up invisible. When I open the DomInspector it says they're all there and should be visible (no properties or css hiding them), however they're not. You may be wondering why I'm using createDocument at all; I already have the document as instantiated on the first line. This is true, however, if I exclude this line it breaks the back button in Firefox 1.5 and spews out a load of assertion errors about "missing the master prototype" in a debug build. The clincher is that if I remove the createDocument() line, all the buttons show up properly but the back button breaks. I'm at my wits end, can somebody help me? Thanks, Jeremy |
