Re: [DOMCore] Attr

On Sep 10, 2010, at 5:35 AM, Anne van Kesteren wrote:

> Hi,
> 
> I thought I'd email some people directly to figure out what we can do with Attr as it is one of the last bits not defined yet in Web DOM Core and I would sort of like to handle it so the specification is "complete" (at least beyond the initial 80%).
> 
> Attr nodes have traditionally allowed child nodes to account for EntityReference nodes, a concept which no browser vendor implemented. While it is great nobody implemented the complexity that is EntityReference, it has left us with a fair bit complexity for Attr nodes, which is implemented.
> 
> There are several ways we can simplify Attr nodes (some are orthogonal):
> 
> 1) We can drop the concept of Attr nodes having children. In Gecko it already depends on how you created the Attr node [1][2] whether it can have children or not. I think we should either consistently allow children or not at all (preferred).
> 
> 2) We can drop the concept of Attr being a Node. This would drastically reduce the footprint of the object. The difficulty would be in figuring out what we would need to preserve. Ideally someone implements this in a nightly and figures it out.
> 
> 3) We can drop the concept of Attr being an object altogether. I do not think this is doable compatibility-wise, but not having Node.attributes, Attr, and just using getAttribute/getAttributeNS/setAttribute/setAttributeNS would be very nice complexity-wise.
> 
> If there is anything else I have not considered that can we try out please mention it! Any input on this is much appreciated.


My preference would be to simplify as much as we can get away with consistent with Web compatibility, all the way up to removing Attr nodes entirely if we can.

I do not know the Web compat impact of different options though.

Regards,
Maciej

Received on Friday, 10 September 2010 23:06:30 UTC