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

Re: JavaScript / CSS Wizards Please Help

From: Jim Ley <jim@jibbering.com>
Date: Wed, 5 Dec 2001 23:55:57 -0000
Message-ID: <008101c17de8$7e3b8880$623c70c2@7020CT>
To: <w3c-wai-ig@w3.org>
"David Woolley"
> > 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.

If you look at GetRef in the clj FAQ http://jibbering.com/faq/#FAQ4_15
you'll see my approach (the expando property on the document isn't
necessary standard so I'd consider not doing that, I could have a browser
which doesn't support it for example, I also don't agree with the
sensibleness of duplicating gEBI in old browsers, they differ in too many
and unknown ways (and the amount that spoof/paritially implement things
like document.all make it more complicated.)  I think it's safer to think
in DOM1 or 2 terms and give everyone else fallback it's a lot safer.  "Dr
Clue" a poster in comp.lang.javascript and a talented scripter has a very
good "library" system that you're suggesting but it's far from a quality I
could suggest being reasonable from an accessibility P.O.V.

> 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.

Detect the break aswell if possible, as you'll never know when it was

Received on Wednesday, 5 December 2001 18:55:52 UTC

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