W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1999

Re: splitText()

From: <keshlam@us.ibm.com>
Date: Mon, 1 Nov 1999 17:54:21 -0500
To: "L. David Baron" <dbaron@fas.harvard.edu>
cc: www-dom@w3.org
Message-ID: <8525681C.007DD172.00@D51MTA03.pok.ibm.com>
>Am I correct to assume that when splitText() is called on a
>CDATASection node, the return value (new node created) should be a
>CDATASection node rather than a simple Text node?

Good question, and good catch.

Given that we've now moved splitText down to characterData -- which is also
the ancestor of Comment -- I think I agree that the description needs to be
updated. And I think you're probably right about the implication that split
should create another node of the same type as the node which is being
split.

(Just checked my Level 1 implementation, and I didn't special-case this for
CDATASections; they just inherited Text's version, which generated a Text
node for the second half. That did meet the spec, but...)




______________________________________
Joe Kesselman  / IBM Research
Received on Monday, 1 November 1999 17:54:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:46 GMT