[whatwg] DOMParser / XMLSerializer

Jonas Sicking jonas at sicking.cc
Wed May 20 16:46:24 PDT 2009


On Wed, May 20, 2009 at 2:20 PM, Anne van Kesteren <annevk at opera.com> wrote:
> Although it seems most browsers have adopted these APIs, HTML5 offers basically identical APIs in the form of
>
>  document.innerHTML
>
> or is there something that DOMParser / XMLSerializer can do that document.innerHTML cannot?

Mostly I think these APIs came about before innerHTML was supported in
XML content. DOMParser is also somewhat more convenient if you want a
full document back. And XMLSerializer is more convenient if you want
an XML serialization of text/html content.

/ Jonas



More information about the whatwg mailing list