edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] Trees in Trees
@ 2015-09-10  2:39 Karl Dahlke
  0 siblings, 0 replies; only message in thread
From: Karl Dahlke @ 2015-09-10  2:39 UTC (permalink / raw)
  To: Edbrowse-dev

This is just an update of what's happening.
I'm moving towards javascript objects decorating the new tree,
and calling javascript from there,
and some things maybe won't work right away, but one thing that causes issues
is document.write().
Today this injects html into the html stream insitu,
but that can't happen any more.
The script isn't run until html is completely converted into a decorated tree.
That's ok, that's probably how it's suppose to work,
but it means the new html generates a new tree, which is pasted
into the old tree, under the node that ran the javascript.
That could be a <script> tag, or some onclick code
on a button on a form.
So the second tree cranks out, and tidy5 automatically
puts a bunch of infrastructure around it.
document.write("hello")
is going to be more than a text node, it's going to have a root,
an html node, a head with meta and title tags,
and a body, finally with the text node inside it.
Most of that other stuff I have to pass through or throw away.
Then the good stuff I have to paste into the tree
that we have already build, then call render and js2nodes
and look for more scripts etc.
It's all doable, I mean it's not rocket science,
but it will be tricky to get it all right.
I may implement the basic js objects and calls and interactions first,
with no document.write() or innerHTML(), just to test,
just so I'm not biting off more than I can chew.
I'll keep you posted.

Karl Dahlke

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-10  2:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-10  2:39 [Edbrowse-dev] Trees in Trees Karl Dahlke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).