W3C home > Mailing lists > Public > public-svg-wg@w3.org > July to September 2011

[Tiny 1.2] micro-DOM has no attribute iteration mechanism

From: Alex Danilo <alex@abbra.com>
Date: Mon, 15 Aug 2011 09:50:17 +1000
Message-Id: <TJZXPL.PYHFZCPO7ND@abbra.com>
To: SVG WG <public-svg-wg@w3.org>
Cc: <www-svg@w3.org>
Hi Group,

	A developer we've been working with noticed that there is
no mechanism for iterating through the attributes on a node in
the micro-DOM.

	You can iterate the elements with the sibling properties,
but there is no equivalent of 'attributes' on a node. So you need
to know what attributes are on a node or try to fetch every possible
value for a given element to see if the attribute is present
which is pretty horrible.

	If the prodigal son Tiny 1.2 is to have a future, I'd
suggest the micro-DOM add the NamedNodeMap interface supporting
at least the 'length' property and 'item()' method, as well
as adding the 'attributes' property to the 'Node' interface
which gives at least the minimal functionality needed to
support this case.


Received on Sunday, 14 August 2011 23:51:32 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:20:13 UTC