From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from qmta03.westchester.pa.mail.comcast.net (qmta03.westchester.pa.mail.comcast.net [IPv6:2001:558:fe14:43:76:96:62:32]) by hurricane.the-brannons.com (Postfix) with ESMTP id 1E3F17863C for ; Fri, 28 Feb 2014 12:02:39 -0800 (PST) Received: from omta12.westchester.pa.mail.comcast.net ([76.96.62.44]) by qmta03.westchester.pa.mail.comcast.net with comcast id XvzX1n0080xGWP853w1azf; Fri, 28 Feb 2014 20:01:34 +0000 Received: from eklhad ([107.5.36.150]) by omta12.westchester.pa.mail.comcast.net with comcast id Xw1a1n00B3EMmQj3Yw1alU; Fri, 28 Feb 2014 20:01:34 +0000 To: Edbrowse-dev@lists.the-brannons.com From: Karl Dahlke User-Agent: edbrowse/3.5.1 Date: Fri, 28 Feb 2014 15:01:35 -0500 Message-ID: <20140128150135.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=1393617694; bh=Yq2h+Zsz26a7gFP17VdJOnH/xiQKeofQolLmqLj2JG8=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=fCrFU/VV0/X9Cg8ojYSJMQvulQOt8Qs8MlvygHZIosyr/NEjAdsiH3TIEWNVgwnQU 2dRj5pYUcbVHUZONBBu/KVmoM2J2RVPrnd3AN3kKU+4MTyWzLqBcEs6a8sIoDgKUDE ZAiif1oy1KJQ4miJN/KnEQJc+LKO/4+eIOi6ya54Ye1TOukA3d+IVD6P6iqnkJmYj6 u/PxntsmVW1SFRgw8c8kZr/Ruix6eNhxX/OO5MwkFIlqAQMxtqILqcq9wTK9ukfOqK xLwLnPTX2gKtKAEG42hb1a4kgUnRPBmUXv2IlzZjfoiDNPnGnKD1m7uWEbIC0h7bYs rqXxR9GXWmFEA== 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 20:02:39 -0000 > Hmmm, I wonder if we want to try and keep it away from javascript specifics, I don't think you can, really, we always have to support javascript, in whatever its form and syntax and semantics, we're always in there, in the heart of it, so why not write render in the language that we know we have to support, stepping through all the objects that we know we have to have corresponding tags for. I don't see the advantage of transmuting all this to another tree in another home-grown language and then transmuting it back as necessary to work with javascript. Also the tree is mostly made for us already. The form object contains an element array. This array holds the input tags. Each input tag has a value and checked field and default, and if it is a select, it has an array of options, and each option has a checked field and value, and so on, all that tree structure is there in javascript, and has to be there or we aren't doing our job, so render can just trace it as a javascript function. The only thing we need to add is a text object. If there is nothing on the web page but hello world, no tags, no nothing, we would have to invent a

paragraph tag or some such to hold the text. So yes some tweaking on our part, but I do think much of the tree is already built in js and has to be so and will always be so, so why not live in that world when translating the tree back into a text buffer to browse. > How'd this work with forms, event handlers and all the associated machinery? I mentioned that forms already build a fairly substantial tree of javascript objects for us. It's all in place today. And so do tables, with rows under tables and elements under rows, and so on. I think I implemented tables rows and cells as a js tree. I was supppose to. Anyways, an event handler is a function under a tag, which becomes a js function under the corresponding object for that tag. Just another leaf on the tree. Nothing special here, just another member of that object. And I already do this today for onsubmit onreset onchange onclick. So again the js tree is already there. We have to traverse it, and it's easier to traverse in js itself then in any other outside language such as C. > it places a lot of dependancy on something > beyond our control, i.e. the stability or otherwise of a js library. Well I'd be writing render() in javascript itself, not dependent on any library. As long as there is a call to executeJavascriptCode(const char *code) then we're ok. The language of js, i mean for loops and if statements etc, isn't going to change. The objects in the js tree might change, but probably expand in a backward compatible way, and guess what, we have to support all those changes anyways. >>From html to objects and the semantics of those objects, from start to end. And render would have to support the new objects and tags, whatever language it is written in. So it would be easiest if it was written in js where the tree lives. I'm thinking so anyways. Karl Dahlke