[Javascript] document.createElement("TBODY")
Nick Fitzsimons
nick at nickfitz.co.uk
Tue Apr 17 11:10:34 CDT 2007
On 17 Apr 2007, at 16:36:12, Hassan Schroeder wrote:
> Michael Borchers wrote:
>
>> Is there any other way to parse the response than innerHTML?
>
> Using innerHTML is not "parsing" the response. At all.
Actually, "parsing" is precisely what it is: when you assign a string
to the innerHTML property of an element, the browser runs the string
through its tag soup HTML parser, which then builds up the DOM
structure in exactly the same way as it does when loading a page.
This can be demonstrated by identifying a piece of markup which is
parsed incorrectly when present in a document; if the same text is
assigned to innerHTML, the same incorrect parsing will occur.
(I keep meaning to write up a demonstration of this which I presented
at BarCampLondon2; if anybody's interested, hoot at me off-list and
it should encourage me to pull my finger out.)
Regards,
Nick.
--
Nick Fitzsimons
http://www.nickfitz.co.uk/
More information about the Javascript
mailing list