edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev]  startwindow.js changes
@ 2015-01-13 21:10 Karl Dahlke
  2015-01-13 23:21 ` Adam Thompson
  0 siblings, 1 reply; 6+ messages in thread
From: Karl Dahlke @ 2015-01-13 21:10 UTC (permalink / raw)
  To: Edbrowse-dev

Well it did break something in jsrt, though small.

You removed the lines that link the new elements into the arrays
of said elements, and honestly I don't know what the correct behavior is here.
When I create a script, should it be in the list of scripts?
I don't know.
The last function document.script$$pending() assumes that a script created
will be in this list, and then looks through this list for scripts pending,
for a script to run that hasn't been run.
If a created script should not be put on the list document.scripts,
then we have to put this one somewhere, in some kind of queue,
so it can be run.

jsrt exercised this feature by creating one final script which, when run,
put one line at the end of jsrt.browse.
The line use to say {Last Link}.
That line is not there any more, because the last script never runs,
because it is not placed in document.scripts.
We may need to do a little research to see how it *should* behave.
Either these elements get put in their corresponding lists automatically,
or if not then we need to implement a run queue for created scripts.

Karl Dahlke

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [Edbrowse-dev]   startwindow.js changes
@ 2015-01-13 23:42 Karl Dahlke
  2015-01-14  0:15 ` Adam Thompson
  0 siblings, 1 reply; 6+ messages in thread
From: Karl Dahlke @ 2015-01-13 23:42 UTC (permalink / raw)
  To: Edbrowse-dev

> the function returns the created element to javascript
> which then inserts it into the DOM in the correct position,

Yes, but that's just part of it.
Each tag/element is  put in the tree in its correct position,
and also put in the list.
It is linked in two places.
That's how it works when produced by html.
<form> creates a form object, which is somewhere in the dom tree,
and *also* in the list of forms.
I guessed, not much more than a guess, that that is how it works
for elements created dynamically.
An element e is placed somewhere in dom, as directed by javascrtip,
and also put on the list of said elements,
that part perhaps happening automatically.
So I made the second part happen automatically, again being just a guess.
Maybe the only way to know if my guess is right is to write some javascrtip,
createElement,
and alert document.list.length, and run it in a commercial browser
and see what it says.
We may be doing more and more of this;
it's just hard to find descriptions of how this stuff really works
on the internet.

Karl Dahlke

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [Edbrowse-dev] startwindow.js changes
@ 2015-01-13 20:38 Adam Thompson
  0 siblings, 0 replies; 6+ messages in thread
From: Adam Thompson @ 2015-01-13 20:38 UTC (permalink / raw)
  To: Edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

Hi all,

Building on the good work that's been happening over the last couple of days,
I've been going through startwindow.js and have made a few changes to hopefully
bring what we do in line with the DOM standard a bit more.
I've pushed what I've done and really hope I've not broken anything (it seems
to work in my testing, but there's all sorts of odd js out there).

Basically I've removed the autolinking of elements from document.createElement,
made it return an Element rather than Object in the default case,
and enabled support for storing any tag under the document.tag$$map container
(though I'm not sure how to expose the arrays to js properly other than by
document.getElementsByTagName). There're a few more changes,
see the commit for details.

Cheers,
Adam.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-14  0:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-13 21:10 [Edbrowse-dev] startwindow.js changes Karl Dahlke
2015-01-13 23:21 ` Adam Thompson
2015-01-13 23:34   ` Adam Thompson
  -- strict thread matches above, loose matches on Subject: below --
2015-01-13 23:42 Karl Dahlke
2015-01-14  0:15 ` Adam Thompson
2015-01-13 20:38 Adam Thompson

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).