From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-x233.google.com (mail-we0-x233.google.com [IPv6:2a00:1450:400c:c03::233]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 0C84878F4B for ; Tue, 13 Jan 2015 15:24:00 -0800 (PST) Received: by mail-we0-f179.google.com with SMTP id q59so5747086wes.10 for ; Tue, 13 Jan 2015 15:21:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=0cWICGZEibHZxjpErwFdZvW1z62u9oEfzwziiNJBpf8=; b=BajSbZJKVkLUXPfHXkpm+gmQs4gKszK4yvtdT0GJB1UnGco5uUO7MYl7igOs6OOTDR BXhTbduNZUhzENej0QQAWNnN0y0Ank2laVahhvaxs3iVKOGreFWlCo4PNs3wwtVmWCKn 4lPlCaF1eGWY2LapyB9uX94nRAAK7mjJagLdjfWVx5HTZd9kt6Y4+SXDCkiGiaj7ksNO 5z802W61YZ3IO++eavIJswViHxznI+pBi2AqMPoa7uEK+6kfNsXE4Sy5vOIqRnNfz5JG hRVgxp2z1etlvTZsSwvTmTlp645cFkIszDHGecl9W0RupnPGhCqqKG3YyNrWw1XIzOkp d7Dw== X-Received: by 10.194.248.201 with SMTP id yo9mr1321665wjc.75.1421191281953; Tue, 13 Jan 2015 15:21:21 -0800 (PST) Received: from toaster.adamthompson.me.uk (toaster.adamthompson.me.uk. [2001:8b0:1142:9042::2]) by mx.google.com with ESMTPSA id ej10sm869893wib.2.2015.01.13.15.21.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jan 2015 15:21:21 -0800 (PST) Date: Tue, 13 Jan 2015 23:21:18 +0000 From: Adam Thompson To: Karl Dahlke Message-ID: <20150113232118.GL31364@toaster.adamthompson.me.uk> References: <20150013161052.eklhad@comcast.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2EnvhqpWJq810sZn" Content-Disposition: inline In-Reply-To: <20150013161052.eklhad@comcast.net> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Edbrowse-dev@lists.the-brannons.com Subject: Re: [Edbrowse-dev] startwindow.js changes X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 23:24:00 -0000 --2EnvhqpWJq810sZn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 13, 2015 at 04:10:52PM -0500, Karl Dahlke wrote: > Well it did break something in jsrt, though small. >=20 > 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 pendin= g, > 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. >=20 > 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. Sorry, I did wonder if I'd break something by doing this. I'm fairly confident in saying that elements *shouldn't* be put in these li= sts automatically since the function returns the created element to javascript which then inserts it into the DOM in the correct position, i.e. in the case of mouse.com, the created script should really appear before any other scripts in the document and thus at the start of the scripts array. As for what we do about running these scripts, the logic seems to involve reparsing the DOM once the current script has finished execution (I presume) and running the new script elements at that = stage. Since we don't do this at the moment, a separate run queue is probably need= ed, along with some form of functionality in our DOM insertion functions (appendChild, insertBefore etc) to put elements in the correct place in the= se arrays. Tbh, I suspect we can probably put together the relevant functionality in startwindow.js to reparse the DOM and generate the arrays from the js side, though this obviously doesn't help the rendering at all. Also, as per comments in startwindow.js, apparently we're supposed to return something called a node list object rat= her than an array from getElement* functions. No idea what one of these is yet, more future research I think. Cheers, Adam. --2EnvhqpWJq810sZn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUtahuAAoJELZ22lNQBzHO5qsIAMrVTXSIGVkE9BbQAb7cNW4y Tw+mHdhiT6SEWH+PGVOjrifClevCH4127+K4pRRdOuEZkO9X4v5zqNH/VE8vny4M R53eageKeQz240qW67huJm2agyCnNCJAMkXTaKtXYEarn14NS+YG6tAIvmd2txit 9+xwhrI11360Fo6ETWlJN67kOx9kK5DLavoBHW+gtKGU75E0yYYfYpmofLfaCBaO uZ36zS/Q9pwGvWQd9B66V72F/g7NuEkPvI1omVz5DoWC4OUgQeua5vYvmDMGCRFT K8mfGxXTL1pZHG3WDUC9w78v6TXdr9y5iPloFQca9CJM40JjykBmo7FFqiSMzQk= =IEUB -----END PGP SIGNATURE----- --2EnvhqpWJq810sZn--