[Project_owners] XPCNativeWrapper and nsIDOMNSHTMLDocument object

Axel Hecht axel at pike.org
Fri Aug 5 15:49:34 EDT 2005

Didier Ernotte wrote:
> This give me the following error
> Exception... "Node cannot be inserted at the specified point in the
> hierarchy"  code: "3" nsresult: "0x80530003
> if I add
> while (doc.firstChild != null) { doc.removeChild(doc.firstChild); }
> to clean the doc object before, because it seems that there are a
> pre-defined hierarchy in the browser object like
> <html><body></body></html>, FF does not crash, and I have not
> exception, but nothing append.
> If I replace 
> var htmlElem = document.createElement("html");
> var bodyElem = document.createElement("body");
> var embedElem = document.createElement("embed");

The regular browser will show about:blank (I guess), which already has
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

So you could just append the embed to document.body.

I saw that we have 
too. That may help on the first attempt.


More information about the Project_owners mailing list