Message from discussion
all the king's horses and all the king's men
Received: by 10.115.48.12 with SMTP id a12mr1897818wak.21.1226567011764;
Thu, 13 Nov 2008 01:03:31 -0800 (PST)
Return-Path: <kamal.bh...@gmail.com>
Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.171])
by mx.google.com with ESMTP id k19si837328waf.2.2008.11.13.01.03.30;
Thu, 13 Nov 2008 01:03:30 -0800 (PST)
Received-SPF: pass (google.com: domain of kamal.bh...@gmail.com designates 209.85.200.171 as permitted sender) client-ip=209.85.200.171;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of kamal.bh...@gmail.com designates 209.85.200.171 as permitted sender) smtp.mail=kamal.bh...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by wf-out-1314.google.com with SMTP id 29so894742wff.3
for <envjs@googlegroups.com>; Thu, 13 Nov 2008 01:03:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:received:message-id:date:from:to
:subject:in-reply-to:mime-version:content-type
:content-transfer-encoding:content-disposition:references;
bh=m5OuflNcwIVFcoAjw7BS6gw2NVoQfANQBaYph29VFqI=;
b=Aa5NQSY7qvIXifesUOR21EpbHsWwwCxU6vK2v/Uliq/ABtveB9W1+Vty+Uqt8tzfj+
1oi+CNRQrdNW+JmMWT5cQw1nrG9B5Jp7e3FLMrJgA6IIvmzG+iyeXOQunmTqkSu6RyyW
cqPHIwnIjOKAlKrIx9iB9I8EECtaChSwCTf5A=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=message-id:date:from:to:subject:in-reply-to:mime-version
:content-type:content-transfer-encoding:content-disposition
:references;
b=M3eCd/q8T9oApa1HZODA7zF5BIZhADDWhwswLS1/PdEwtzMjXFFSetA5DwlH4bgrWL
HSLFcra5h/se+J+2h7h8FFOFdMbdNRfT7FtJ1sfW1/vWG+J+ty6sMEkK0gdcTfs4gbAA
1kg0FafVjyy2jJGt62nO2COwWQlLsoMnrpGbU=
Received: by 10.142.128.15 with SMTP id a15mr3723933wfd.260.1226567010579;
Thu, 13 Nov 2008 01:03:30 -0800 (PST)
Received: by 10.142.203.13 with HTTP; Thu, 13 Nov 2008 01:03:30 -0800 (PST)
Message-ID: <da0753200811130103i63d7449asacc15b4327c8866e@mail.gmail.com>
Date: Thu, 13 Nov 2008 20:03:30 +1100
From: "Kamal Bhatt" <kamal.bh...@gmail.com>
To: envjs@googlegroups.com
Subject: Re: all the king's horses and all the king's men
In-Reply-To: <b99491f30811111753y3ea2bf74r6a47c5a613119...@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
References: <b99491f30811111209v43b00b18xa416dcc01e4ac...@mail.gmail.com>
<730bab940811111453j16bacaxd0e998e24a614...@mail.gmail.com>
<b99491f30811111753y3ea2bf74r6a47c5a613119...@mail.gmail.com>
Hey Chris,
That would be me that you are talking about. I got distracted (I am
sorry to admit I have been playing Fallout 3).
I am going on a month long holiday in December (around the 7th), but I
going to try and pull myself away from Fallout long enough to get some
more done. I have been relying on the DOM level 2 standard [1]
(straight from the horses mouth), but I have been creating my own
tests (using a framework I help develop for work) to run against this.
IMHO, I would be wary of testing against jQuery. I think the standard
should be the HTML DOM standard. If we work towards providing support
to test jQuery, we might fool ourselves and we may not cover some
cases that jQuery (probably rightly) does not support. For example,
did you know that <br> and script tags can have a class? Things like
this are not supported by jQuery, but I think we should.
I had setup my own repository [2], and you can have a look at it.
Someone had fixed up my code, but I cannot remember who it was. They
put a reference on the mailing list. This code is out of date, and I
need to work out how to upload the new stuff. In the new stuff, I have
better support for HTMLDocument support and HTMLImageElement support
(surprisingly tricky)
Some of the issues I still have to cover off:
* How do we handle DOMElements vs HTMLElement
* Right now, I have hacked the code to have XMLHttpRequest instantiate
a HTMLDocument in all circumstances. This is wrong, so we may need to
remove the use of XMLHttpRequest to initialise the document.
* Right now, I have the following code repeated for most elements that
inherit HTMLElement:
this._dom = node;
if (node === undefined) return;
// Load CSS info
var styles = (this.getAttribute("style") || "").split(/\s*;\s*/);
for ( var i = 0; i < styles.length; i++ ) {
var style = styles[i].split(/\s*:\s*/);
if ( style.length == 2 )
this.style[ style[0] ] = style[1];
}
// This isn't accurate, but it will do as most elements support style.
// TODO: Provide more rigid style support.
this.style = {
get opacity(){ return this._opacity; },
set opacity(val){ this._opacity = val + ""; }
}
This is nasty, and it will only get worse. Any suggestions appreciated.
* Also, as I say in the comment above, our support for the style
element is pretty lousy. We need to fix it up.
We should put our heads together on this.
[1] http://www.w3.org/DOM/DOMTR
[2] http://github.com/KamBha/env-js/tree/master/test
On Wed, Nov 12, 2008 at 12:53 PM, chris thatcher
<thatcher.christop...@gmail.com> wrote:
> pretty sure its related to some stuff I missed with NodeList. I'm breaking
> the dom stuff out now and implementing the rest of them. I'm also going to
> stub out the html stuff and if I can pull it out of my butt will have it
> done by morning. The project will look bloated becuase I'm starting with a
> js file per interface, but we can move stuff around later.
>
> I am interested in having folks with knowledge of other js engines look at
> how the env platform specific stuff was broken out, I'm expecting those
> requirements to change the implementation details, but again, it's just a
> step in the right direction.
>
> I'm relying heavily on David Flanagan's 'JavaScript - The Definitive Guide'
> to understand everything that's meant to be exposed for browser client
> javascript. If there is a better resource let me know.
>
> On Tue, Nov 11, 2008 at 5:53 PM, John Resig <jere...@gmail.com> wrote:
>>
>> This is great news, Chris - I'll check into the details of your
>> implementation as soon as I can. Definitely try to see what the
>> difference in pass/fail is from the normal one - 117 sounds a little
>> high.
>>
>> --John
>>
>>
>>
>> On Tue, Nov 11, 2008 at 3:09 PM, chris thatcher
>> <thatcher.christop...@gmail.com> wrote:
>> > Spent a bunch of hours putting env.js back together with the java pulled
>> > out. Added a bunch of core window attributes and their respective
>> > functions/attributes.
>> >
>> > I checked against the current tests that John had running with make, I
>> > should have checked before, now I can't remember how many passed failed
>> > etc,
>> > but currently 531 pass and 117 fail.
>> >
>> > The build process is still rough, concat with ant and run jsl by hand.
>> > I
>> > commited the distributables so folks can try without having to build for
>> > now. You'll want to download dist/env.rhino.js.
>> >
>> > The major weakness, imho, currently is the dom stuff which really needs
>> > to
>> > be seperated out into the dom and html parts respectively. I'm going to
>> > look back through the mailings because I know someone started that and
>> > it
>> > would be great to make a coordinated effort to just get it done.
>> >
>> > It's starting to look much more like the skeleton of a full browser
>> > environment.
>> >
>> > Cheers
>> >
>> > --
>> > Christopher Thatcher
>> >
>> > >
>> >
>>
>>
>
>
>
> --
> Christopher Thatcher
>
> >
>