View previous topic :: View next topic |
Author |
Message |
froomzer Enthusiastic Coder
Joined: 23 May 2006 Posts: 148
|
I was thinking about method support detection such as id (document.all) but DOM support is no method...
Look he has a browser var
And does for instance if (browser != 'IE 5.0')
Reply with quote
|
|
|
|
montanarry Enthusiastic Coder
Joined: 13 May 2006 Posts: 175
|
Yes.
This is not his only browser specific code..
There are plenty of other examples where he tests for specific functionality
Reply with quote
|
|
|
|
froomzer Enthusiastic Coder
Joined: 23 May 2006 Posts: 148
| |
montanarry Enthusiastic Coder
Joined: 13 May 2006 Posts: 175
|
froomzer, You will note that the second variable he declares is "W3CDOM"
Reply with quote
|
|
|
|
froomzer Enthusiastic Coder
Joined: 23 May 2006 Posts: 148
|
Yes was just looking that. In fact var browser is only used for IE 5.0 which AFAIK really buggy
Reply with quote
|
|
|
|
montanarry Enthusiastic Coder
Joined: 13 May 2006 Posts: 175
|
Yes
The major feature to observe is that most of his code tests for something being possible before attempting it. This is probably the most important thing to bear in mind for making sure that your javascript doesn't break things.
(I wouldn't neccesarily recommend all features of this script. But PPK knows a shit load more than I do, so some of the things I wouldn't recommend I might be plain wrong about. )
Reply with quote
|
|
|
|
froomzer Enthusiastic Coder
Joined: 23 May 2006 Posts: 148
|
Yes that the reason why I wanna to test methods not sniff browser name
Reply with quote
|
|
|
|
montanarry Enthusiastic Coder
Joined: 13 May 2006 Posts: 175
|
As I said. All the sniffing of browser name does is check if the user is using a sufficiently shitty browser that it's not worth trying various things.
Reply with quote
|
|
|
|
froomzer Enthusiastic Coder
Joined: 23 May 2006 Posts: 148
|
I think I understand now the strategy : if super crappy IE 5.0 do nothing else if IE 5.xxx do buggy way else do normal things
Reply with quote
|
|
|
|
|