Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Inserting a subtree into a XUL document

1 view
Skip to first unread message

Fabrice Desré

unread,
Sep 26, 2006, 10:26:13 AM9/26/06
to
Hello,

I'm trying to add content to the current XUL document from another XML
document. The code looks like :

replaceSubtree: function(content, targetDoc, id) {
var node = targetDoc.getElementById(id);
var newNode = content.cloneNode(true);
node.parentNode.replaceChild(targetDoc.importNode(newNode, true), node);
}

It works visually, but I'm getting errors in the console (using a debug
build) :
###!!! ASSERTION: Already have a document. Unbind first!:
'!GetCurrentDoc() && !IsInDoc()', file nsGenericDOMDataNode.cpp, line 588

And oncommand event are not dispatched :
JavaScript error: , line 0: uncaught exception: Permission denied to get
property ChromeWindow.onDoUpdate()

Any help appreciated !

Fabrice

0 new messages