From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from qmta10.westchester.pa.mail.comcast.net (qmta10.westchester.pa.mail.comcast.net [IPv6:2001:558:fe14:43:76:96:62:17]) by hurricane.the-brannons.com (Postfix) with ESMTP id 451307863C for ; Fri, 28 Feb 2014 15:33:44 -0800 (PST) Received: from omta22.westchester.pa.mail.comcast.net ([76.96.62.73]) by qmta10.westchester.pa.mail.comcast.net with comcast id XvBh1n0011ap0As5AzYc8t; Fri, 28 Feb 2014 23:32:36 +0000 Received: from eklhad ([107.5.36.150]) by omta22.westchester.pa.mail.comcast.net with comcast id XzYc1n0023EMmQj3izYc9n; Fri, 28 Feb 2014 23:32:36 +0000 To: Edbrowse-dev@lists.the-brannons.com From: Karl Dahlke User-Agent: edbrowse/3.5.1 Date: Fri, 28 Feb 2014 18:32:38 -0500 Message-ID: <20140128183238.eklhad@comcast.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1393630356; bh=U3UrQqfE7q+Z3gHvmD/bGBoWWKT7p9SBZPLTZyH0eqs=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=BRC4/1aMNy3Igh8seElaltLM84uPWgzkTqWAnRbxtl7zzzpLos3zK/vXIWo/YyT0X oTgZkqkHpJkb2gAIMi13l892s37YNCYX/ILRDVJS31Xa/PNCs3kvEUGiivI06V4/oD ynOx1C/cEnxJVlw0/yx4aWKVKMYv91yz9bE1NZwhFKz4XdFepPoT75St5JxivXZ9HQ hxxtkqjghf3ZUq7v1kA5OVoJ2AicvgN0/FI2AEhhPQALoHk8H+8p10PQqv1wP7U9gR LT++WoBqh+pf1WqwZ9/n8XDFpzvDHk2cgKpbK65fEKAk4JmfajFrxNXcrbnizJUiPb wSKEsvolvsw3g== Subject: [Edbrowse-dev] Render X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Karl Dahlke List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2014 23:33:44 -0000 > Also, how are you going to make this function called every time js does anything? Already done. jSyncup is called before every js action, and jsdw is called afterword. It's already bracketed. And we have to do that anyways, to see what changes js made to our buffer and report them back to the user. These are things you just "see" in a regular browser. "Oh - I clicked this button and now there's something new there." We have to report it, and I made a first stab at it, but we have to do better. Like jsrt when you push the calc button it tells you that a line was updated. > Primarily because I know of no way of protecting this js render function from > being zapped by an unfortunately crafted page. Like malice? > At the moment if js does stupid things and breaks the js dom that's not nice > if it completely destroys our method for rendering the buffer that's > not only difficult to debug but also means you end up with an empty page. Yes, a great point made in one sentence. You couldn't turn js completely off, as you do today, it would still have to be on long enough to build the objects from html like today, but not run any scripts, then traverse the objects to render the page, which is a funny flavor of off, not entirely off. And if js was off because some other session hogged all the js memory, well then we're up the creek eh? Really annoying that the js pool is a fixed size. So yes there's more to think about here. Damn, I really liked the idea too! Well we have time to mull it over and talk it out. I found this in a tutorial long ago and bookmarked it. It's the kind of thing we should support. See how tables and cells and paragraphs and just about anything on the web page can be built by javascript, not just by html tags? https://developer.mozilla.org/en/docs/Traversing_an_HTML_table_with_JavaScript_and_DOM_Interfaces Most web pages aren't that crazy but some are, and more and more web pages at least build little partswith js, like building the secondary menu based on your selection in a primary menu. That happens all the time. I wrote such a website for my work; I wrote a website I couldn't even use with edbrowse. Ironic. Anyways, I wonder, how long can we say "Gee we need to render html even if js won't run", will the day come when there just aren't many web pages left that have any meaning without js? Not trying to cause trouble, just wondering. So anyways all this dynamic creation, perhaps well after the page is parsed, perhaps because you pushed a button, all this dynamism we must support. html tags become js objects. js scripts make more objects or change these objects. js objects become things on the screen, or in our case the text buffer. User pushes a button. js function makes new objects or changes the objects. js tree of objects implies a new buffer. compare with the old buffer and report any differences. Wait for next user input or action. Karl Dahlke