Kevin, the last line you quoted from the spec...

> although they may be accessed by an index as in an array.

Ok, if so, then the only practical way to implement that is as an array,
which I did in domLink() in decorate.c,
but we don't do that when creating nodes dynamically from js.
So c. attributes should be new Array, not new Object, but there's more.
In setAttribute() line 635 is either unnecessary or not enough.
We need to preserve the array essence.
Don't we need this?

this.attributes.push(name.toLowerCase());

And in removeAttribute it's fine to delete foo from attributes,
where we had set attributes.foo = bar, but we must also splice foo out of 
position i in the array.

I'm guessing that if c is the node then there are really three actions to foo = 
bar.

c.foo = bar
c.attributes.foo = bar
c.attributes.push("foo")

I'm not sure of this, I only know what we have is inconsistent,
and will definitely cause trouble at some point.
If you can confirm that my understanding of this is correct I can clean it up,
or perhaps Kevin or Adam can take it on.

Karl Dahlke
_______________________________________________
Edbrowse-dev mailing list
[email protected]
http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev

Reply via email to