From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) by hurricane.the-brannons.com (Postfix) with ESMTPS id D3C9577AA7 for ; Sun, 14 Jun 2015 02:12:43 -0700 (PDT) Received: by wiwd19 with SMTP id d19so50415780wiw.0 for ; Sun, 14 Jun 2015 02:14:04 -0700 (PDT) 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=M1ififhFAFT9jvi4IlpI4Wqx984w1Ql1rDuxlD0oTK4=; b=LnTTgzUiR/vtp6ON4V1kTY+2BeB9LrWW43l4Ksi5aH4guqeztcQLUXvw1UH6aFAZqJ WX3wdOfRVNVHH6MO4bse/Zz5Kj2iC5Ja8WFSlht4Hz69wWwrVfcG6XQFuJ6nPacK3isT iJBVjhNwIuYJnO27hRjWynU17rJEcp7v9+8wqsVvKIohWSidPoJSl0l5svUMZPtk3G6V 20jBV/GUkI1Xja0bdBhxiEyt3cbk4r6nGDWMMvUEMdiIbDbbwTbYe/tCQXbhbxojP5A8 Wt/4iEagrL0N31izAB+SiitqfvOojNl5nmvsDbJ3a73uVB8m4Y6LJl5M7kRV1ImEw7sy AKbA== X-Received: by 10.194.178.201 with SMTP id da9mr41389834wjc.139.1434273243978; Sun, 14 Jun 2015 02:14:03 -0700 (PDT) Received: from toaster.adamthompson.me.uk (toaster.adamthompson.me.uk. [2001:8b0:1142:9042::2]) by mx.google.com with ESMTPSA id k2sm10601572wix.4.2015.06.14.02.14.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Jun 2015 02:14:03 -0700 (PDT) Date: Sun, 14 Jun 2015 10:13:50 +0100 From: Adam Thompson To: Karl Dahlke Message-ID: <20150614091350.GA9965@toaster.adamthompson.me.uk> References: <20150513044849.eklhad@comcast.net> <20150513065049.eklhad@comcast.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Nq2Wo0NMKNjxTN9z" Content-Disposition: inline In-Reply-To: <20150513065049.eklhad@comcast.net> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Edbrowse-dev@lists.the-brannons.com Subject: Re: [Edbrowse-dev] getters and setters in straight javascript 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: Sun, 14 Jun 2015 09:12:44 -0000 --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Jun 13, 2015 at 06:50:49AM -0400, Karl Dahlke wrote: > This is a followup to my previous message. > If getters and setters are feasible in straight javascript, > here is how the url class would look. > If you paste this into startwindow.js it compiles properly. > The syntax is right. > And the code looks right to me, but of course it blows up > because there are then js setters and C setters and they collide. Does this actually work with the existing machinary? Some of the code in startwindow.js doesn't work as expected in terms of rendering elements (at least as far as I know), I'm thinking particularly in terms of the link between appendchild and the rendered html. Of course, if I'm wrong, please correct me. In addition, we're actually violating the DOM spec by doing some of these things in pure js since they have the concept of "host objects" which are defined by the host and don't quite behave like ordinary js objects in terms of not having prototypes etc. I guess my thoughts on this are that, once we actually settle on a suitable js engine (duktape, mozilla, whatever) we should re-evaluate what's in startwindow.js and what's in c to ensure that: a) It actually works rather than just keeping js happy b) it doesn't rely on engine-specific js c) it's maintainable Once we sort the parser and js engine, we'll probably need to combine the two into one process anyway to make this whole thing work much better since we're going to have to get a better link between js-generated DOM and html-generated DOM. Cheers, Adam. --Nq2Wo0NMKNjxTN9z Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVfUXOAAoJELZ22lNQBzHOElQH/RYY+pLZ0TFXbeyHD8qlUd/5 hs1eM8k2gC7elXYVc/4C3lCeatW6xoAoHU7YgS4Yy6Clnwj/6oysVA9eIlbQoSuu xqu08W9nYONqJTd8O898iIrNicdnLXBYW642wAA4tn/jb4IyiGzoRLP9Hua8wFXX X/ao2M+Jaw/dj2n5pjr+VMfJ4FAm4zzdjPw1Ubw//0MJ25OMgN7VgfhYewgWCc58 lzR/dA44DugNFjw1Z1zkMhPw2tgVJJMtl/mXO6savdT7aGhpdHrIoUyj8RPoQxaN /CSaX01zsXlocySOpaKyEMKoiPtqBk/wwHEBk/CEojDelL5xPzYk/XUEeVHm51c= =z0/l -----END PGP SIGNATURE----- --Nq2Wo0NMKNjxTN9z--