[whatwg] getElementsByIdPart

chriswa at comcast.net wrote:

> Mind you I'm not saying that you cannot do that with an XML document.  You can but can you do this in an HTML DOM document? 

Mozilla wll allow XPATH evaluations against a HTML document (the 
expression mustn't use namespaces and passing null as the namespace 
resolver works). I've no idea if this is supposed to work, or if it 
works in other implementations, but it is very useful.

> much more complicated than merely scanning the elements and using indexOf().

I don't see why this is an unacceptable solution; it's presumably only a 
few lines of code and I wouldn't expect it to be too slow for most 
documents.

-- 
"If anybody ever tells you that you?re using the language incorrectly, 
just yell 'prescriptive grammarian!' at the top of your voice and all 
the linguists in the building will run over and surround the guy... and 
then they?ll rough him up"

Received on Monday, 9 August 2004 13:19:28 UTC