- From: Andrew M. Kuchling <akuchlin@cnri.reston.va.us>
- Date: Mon, 12 Oct 1998 15:18:21 -0400 (EDT)
- To: www-dom@w3.org
In the spec, the getElementsByTagName() method of an Element node "returns a NodeList of all descendant elements with a given tag name, in the order in which they would be encountered in a preorder traversal of the Element tree." Presumably the element itself isn't included in the resulting NodeList? That is, after body = doc.createElement('body'), body.getElementsByTagName('*') will return an empty list, not a single-element list containing the body element. Am I correct? Another minor inconsistency that keeps tripping me up: Document nodes have methods entitled createComment, createDocumentFragment, createElement, which are all 'create' + an interface name. But one method is different: createTextNode(), where I'd expect createText(). -- A.M. Kuchling http://starship.skyport.net/crew/amk/ It is unnecessary to understand electromagnetic theory before wiring a lamp or to study physics in order to repair a pump. We count on our fingers and give no heed to the proliferating implications of the act. -- James R. Newman
Received on Monday, 12 October 1998 15:18:23 UTC