edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Adam Thompson <arthompson1990@gmail.com>
To: Kevin Carhart <kevin@carhart.net>
Cc: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] startwindow / class NodeList
Date: Tue, 11 Aug 2015 22:38:28 +0100	[thread overview]
Message-ID: <20150811213828.GD993@toaster.adamthompson.me.uk> (raw)
In-Reply-To: <alpine.LRH.2.03.1508100049370.5894@carhart.net>

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

Hi Kevin,

On Mon, Aug 10, 2015 at 01:56:27AM -0700, Kevin Carhart wrote:
> 
> I was familiarizing myself with DOM discussions on the listserv over
> 2014-15, so that I can hopefully contribute and be up to date on recent work
> when trying to figure out how.  I've installed from github, and have been
> taking a look at the startwindow.js.  Maybe I could help build out some
> pieces of DOM?
> 
> I noticed something in past DOM discussions on the list.  A while ago, Adam
> said, "Also, as per comments in startwindow.js, apparently we're supposed to
> return something called a node list object rather than an array from
> getElement* functions. No idea what one of these is yet, more future
> research I think."
> 
> You may know this already, but the env.js code has a specification for
> NodeList!  I put it up at:
> http://carhart.net/~kevin/nodelist.js
> 
> Adam, you said you had taken a look at env.js, right?  I know it isn't
> suitable as an implementation out of the box, but do you think env is
> useable as a guide, for example if I was to try and adapt
> document.getElementsByTagName to return a NodeList?

I took a look, but it seemed heavily bound to a specific js engine when I looked.
Part of the problem we'd have with using a js DOM like this is that there's
currently very little connection between the js objects and the rendered page.
This isn't easy to solve, and the DOM spec seems to indicate that large parts
of it are expected to be implemented directly by the host, *not* in javascript.
Thus, I'm actualy considering pulling some stuff *out of* startwindow.js and
putting it back into C as the alternative is trying to hook up custom js
objects to our renderer which I can't imagine working terribly well.

> I notice in the env code that they cite URLs from w3, which makes me hopeful
> that they have done good generic work that just happens to be in javascript.
> Here's what they have to say about document and about the 'Node' class,
> http://carhart.net/~kevin/document.js
> http://carhart.net/~kevin/node.js

I'll certainly have a look at all this again though and see what we can use,
but I really think we'll just need to suck it up and do the work in our c
code rather than the js engine if we ever want to make anything robust.
The current situation's bad enough, with some functions in startwindow.js
having seemingly *no* impact on the rendered text dispite the fact that they really should.

There's also the mention of host objects which I came across when reading about DOM.
These sound like they're exposed to js as objects but are designed not to be js
objects in reality so, whereas in most situations they behave just like a
standard object, certain parts can't be changed (prototypes I think).
Again, more research required.

Cheers,
Adam.

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

  reply	other threads:[~2015-08-11 21:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-10  8:56 Kevin Carhart
2015-08-11 21:38 ` Adam Thompson [this message]
2015-08-12  0:15   ` Karl Dahlke
2015-08-12 19:55     ` Kevin Carhart
2015-08-12 20:56       ` Karl Dahlke
2015-08-13  1:08         ` Chris Brannon
2015-08-13  4:36           ` [Edbrowse-dev] tidy5 Kevin Carhart
2015-08-13 20:07             ` Adam Thompson
2015-08-14  0:54               ` Kevin Carhart
2015-08-14  3:45                 ` Karl Dahlke
2015-08-14 20:17                   ` Chris Brannon
2015-08-16  5:54                     ` Kevin Carhart
2015-08-16 10:38                       ` Karl Dahlke
2015-08-14  3:37               ` Karl Dahlke
2015-08-16 18:10                 ` 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=20150811213828.GD993@toaster.adamthompson.me.uk \
    --to=arthompson1990@gmail.com \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    --cc=kevin@carhart.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).