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

[DOMCore] Traversal

From: Anne van Kesteren <annevk@opera.com>
Date: Fri, 22 Jul 2011 18:01:57 +0200
To: "WebApps WG" <public-webapps@w3.org>
Message-ID: <op.vy02tju064w2qv@annevk-macbookpro.local>
DOM Traversal was not yet updated to meet our new requirements for robust  
specifications so over the past couple of days I attempted doing that. The  
result can be read in:

http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#traversal

I fixed a number of issues with the old specification and included some  
suggestions from this list. This is a rough summary of what has changed  
apart from the new way of defining these features:

* The entityReferenceExpansion from the constructor methods is gone. As is  
the expandEntityReferences attribute. Nobody does entity reference nodes.

* acceptNode() now uses unsigned short.

* The constructor method arguments except for the first argument are now  
optional. whatToShow defaults to SHOW_ALL (in WebKit it currently defaults  
to 0 which is rather useless).

* Instead of throwing a NOT_SUPPORTED_ERR when the first argument is null  
it lets Web IDL decide what should be done there by not using the ? syntax  
in the IDL.

* Recursive invocation (i.e. from the filter) is prohibited and throws  
INVALID_STATE_ERR as is already the case in Opera and Gecko. (WebKit does  
not always do it.)

* The proprietary attributes referenceNode and pointerBeforeReferenceNode  
on NodeIterator as found in WebKit and Gecko have been added.

I included it in DOM Core because all the terminology is shared and the  
constructor methods for NodeIterator and TreeWalker are on Document.

Feedback very much appreciated!


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Friday, 22 July 2011 16:02:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:46 GMT