Re: The future of XML related technologies in Mozilla
Ian Hickson <[email protected]> Wed, 1 Nov 2006 18:56:47 +0000 (UTC)
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 1 Nov 2006, Boris Zbarsky wrote:
>
> OK, I sense a significant communications failure here. Let's say we
> have:
>
> <div id="foo">Text</div>
>
> and script as follows:
>
> var node = document.getElementById("foo");
> var str = (new DOMSerializer()).serializeToString(node);
> var str2 = node.innerHTML.
>
> Then str is the string: '<div id="foo">Text</div>' while str2 is the
> string: 'Text'
>
> To get the string in |str| using innerHTML, you would have to use the
> code with importNode and company that I posted in my previous post. This
> is why outerHTML exists, fwiw.
Oh, I see what you're saying. I have no objection to introducing outerHTML
as well. Currently I haven't done so mostly because Mozilla doesn't
support it, so I assumed there wasn't strong demand for it.
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'