Questions about replaceWholeText

Dear DOM WG!

I am new to DOM and after reading the specification of
replaceWholeText method I have several questions. I suspect
them to be caused by my poor English so I would be grateful
if someone can clarify them. First let me cite the
specification:

   This method returns the node in the hierarchy which received
   the replacement text, which is null if the text was empty or
   is the current node if the current node is not read-only or
   otherwise is a new node of the same type as the current node
   inserted at the site of the replacement. All
   logically-adjacent text nodes are removed including the
   current node unless it was the recipient of the replacement
   text.
                 <skipped>...</skipped>
   Return Value
   Text The Text node created with the specified content.
   Exceptions
   DOMException NO_MODIFICATION_ALLOWED_ERR: Raised if one of
                the Text nodes being replaced is readonly.

And here are my questions:
  1) What is null when the replacement text is empty?
     Is it method's return value or returned node's text
     content that is null?
  2) Suppose I have three logically-adjacent text nodes
     (N1, N2, N3). Let N2 be readonly and the others are
     not readonly. If I call replaceWholeText('some text') on
     N2 what result should I expect? Should it be (N4, N2)
     (where N4 - new text node containing 'some text') or
     (N2, N4) or (N1, N2, N3) and the NO_MODIFICATION_ALLOWED_ERR
     should be raised or the result should be something else?

Thanks.

-- 
Yours sincerely,
Vadim.

Received on Monday, 8 September 2003 18:19:42 UTC