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.
Kind regards,
[1]<http://software.hixie.ch/utilities/js/live-dom-viewer/saved/625>
[2]<http://software.hixie.ch/utilities/js/live-dom-viewer/saved/626>
--
Anne van Kesteren
http://annevankesteren.nl/