- From: Jim Ley <jim@jibbering.com>
- Date: Sat, 17 Nov 2001 14:17:28 -0000
- To: <w3c-wai-gl@w3.org>
"jonathan chetwynd": > I expect DOM-2 needs a whole large section. The techniques involved in DOM2 are no different to the techniques involved in any other DOM, there's no way of identifying if a browser does support DOM 2 (in theory there is - there should be the implementation object hasFeature method, but as the only implementations of this give incorrect results you still need to do all the same object detection to overcome the areas where it's not been implemented, despite what hasFeature says.) There's a case for DOM 2 being encouraged over proprietary DOM's, but then simple "maximum exposure" of your script already does that, the only multibrowser multiplatform approach to most scripting is using DOM, either 0,1 or 2, but DOM 2 alone isn't enough, for example, how you get to the Document object (for example.) is not standardised anywhere other than the browser vendors mutual agreement. I see no differing techniques involved in authoring accessible scripts by using DOM2 over proprietary ones, all the issues are the same, we just need to encourage use of DOM 2 which we already do via the "author to appropriate standards" checkpoint. > Please could members post me their suggestions? > > I've started the ball rolling with a 'whitespace' issue: > http://www.learningdifficulty.org/develop/w3c-scripts.html#dom-2 The whitespace is a non issue, unless you're iterating over all the elements, and this isn't something you often need to do - I certainly wouldn't've thought those needing to read a techniques document would need to. It is most inefficient and poorly supported by browsers, using getElementById, or getElementsByTagName is a lot more efficient and makes a lot more sense, especially as it avoids the problems you're addressing there - Rather than go for complicated workarounds (which result in parse errors in older standards compliant browsers.) you just avoid having to iterate over objects, unless you really have to. (The nodomws.js script incorrectly defines whitespace and for no reason other than making the Regular expressions more complicated that I can see.) Jim.
Received on Saturday, 17 November 2001 11:26:35 UTC