Chris writes:
> Since we only need to parse HTML once, when the document is read, we can
> dispense with the tidy tree as soon as we have converted it to our DOM.

True, but bear in mind we may need to do the same thing again,
creating another dom tree that pastes into the first,
as a branch of the first.
This happens in at least two ways.

document.write()
document.something.innerHTML()

Both of these inject html into the stream, as though it was written at that 
point.
This html must be parsed, and the resulting dom tree
becomes a subtree of the higher tree,
attached to the js script node that called document.write()
or to the entity that becomes "this" for innerHTML.
I accomplish this now by calling htmlParse() in html.c
whenever I have some html to parse.
This can be called multiple times from within one browsing operation,
or again as you push buttons and otherwise activate js functions.
Chris let me know if you want more collaboration on using tidy to parse the html
rather than my home grown parser.
I'm happy to help,
or at least unravel the mystery of the code that is already there.

Karl Dahlke
_______________________________________________
Edbrowse-dev mailing list
[email protected]
http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev

Reply via email to