Hi, I wonder if there will be any DOM 2 Ranges errata, which would clarify some problems in that specification. For example what should happen in this case javascript:var r = document.createRange(); r.setStart(document.createElement("foo"), 0); Some implementations allow creating a range even if the boundary node isn't in the document, some implementations thrown an exception. http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113/ranges.html#Level-2-Range-Position "The boundary-points of a Range _must_ have a common ancestor container which is either a Document, DocumentFragment or Attr node. That is, the content of a Range must be entirely within the subtree rooted by a single Document, DocumentFragment or Attr Node." But Range.setStart Exceptions INVALID_NODE_TYPE_ERR: Raised if refNode or an ancestor of refNode is an Entity, Notation, or DocumentType node. INDEX_SIZE_ERR: Raised if offset is negative or greater than the number of child units in refNode. Child units are 16-bit units if refNode is a type of CharacterData node (e.g., a Text or Comment node) or a ProcessingInstruction node. Child units are Nodes in all other cases. INVALID_STATE_ERR: Raised if detach() has already been invoked on this object. br, -OlliReceived on Tuesday, 16 May 2006 14:00:40 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 3 May 2007 00:17:19 GMT