edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Adam Thompson <arthompson1990@gmail.com>
To: Karl Dahlke <eklhad@comcast.net>
Cc: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] getters and setters in straight javascript
Date: Sun, 14 Jun 2015 10:13:50 +0100	[thread overview]
Message-ID: <20150614091350.GA9965@toaster.adamthompson.me.uk> (raw)
In-Reply-To: <20150513065049.eklhad@comcast.net>

[-- Attachment #1: Type: text/plain, Size: 1551 bytes --]

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.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-06-14  9:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-13  8:48 Karl Dahlke
2015-06-13 10:50 ` Karl Dahlke
2015-06-14  9:13   ` Adam Thompson [this message]
2015-06-13 21:39 ` Chris Brannon
2015-06-14  9:11   ` Karl Dahlke
2015-06-14  9:31     ` Adam Thompson
2015-06-14 15:04       ` Karl Dahlke
2015-06-15 19:59         ` Adam Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150614091350.GA9965@toaster.adamthompson.me.uk \
    --to=arthompson1990@gmail.com \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    --cc=eklhad@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).