[Project_owners] XPCNativeWrapper and nsIDOMNSHTMLDocument object

Gerald Vogt vogt at spamcop.net
Fri Aug 5 11:03:42 EDT 2005


Didier Ernotte wrote:
> In Firefox 1.0.6, I use:
> 
> var br = document.createElement("browser");
> someObject.appendChild(br);
> var doc = br.contentDocument;
> doc.write("<HTML><BODY><EMBED.....></embed></body></html>");

I use the "data:" in the src attribute of an iframe to write some html 
code. Kind of like:

"data:text/html;charset=utf-8,<html>" + ...

Set the src attribute of the browser element to this string.

Not sure, if that is a really better way than a direct write and if this 
works on 1.1. The proper way would properly to create the HTML elements 
and put the into the DOM.

Gerald


More information about the Project_owners mailing list