On Tue, Jan 13, 2015 at 11:21:18PM +0000, Adam Thompson wrote: > On Tue, Jan 13, 2015 at 04:10:52PM -0500, Karl Dahlke wrote: > > 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. Ok, as a temporary fix, I've implemented document.script$$queue, where scripts are pushed (like they used to be with document.scripts) upon creation. This fixes the jsrt test at least. Though, looking at how you're supposed to create elements with js, this test looks broken in that it assumes a script is going to be ran which is never explicitly inserted into the DOM (createElement does just that, creates a DOM object). Cheers, Adam.