W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > October to December 2001

Re: JavaScript / CSS Wizards Please Help

From: David Woolley <david@djwhome.demon.co.uk>
Date: Wed, 5 Dec 2001 21:26:34 +0000 (GMT)
Message-Id: <200112052126.fB5LQYg07999@djwhome.demon.co.uk>
To: w3c-wai-ig@w3.org
> It should be:
> // once per JS file
> var d=document;
> var DOM=(d.getElementById)?true:false;

I'd need to check some details, but I believe that you can define
functions dynamically,  by the use of strings, or possibly by 
copying a function between attributes.  If that is correct, I'd say
the best way of doing this would be to upgrade all the browsers to
DOM1 status by defining getElementById in those that don't already
support it.

In any case, I agree that the standards approach should be first,
not second, choice, but don't think talking in terms of particular
browsers is a good idea.  You should think in terms of testing 
for the presence of features, rather than particular browsers; this
code is feature testing, but labelling by browser, but a lot of
NS 6 failures are the result of user agent testing rather than feature

Only resort to thinking in terms of a browser when it behaves as 
though a feature is present when it is actually broken; but, better,
avoid such features.
Received on Wednesday, 5 December 2001 17:13:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:15 UTC