browsers & standards

M

Mick White

Richard said:
But it always seems many fewer cases than some seem to think. You, for
example, have not raised any concrete cases that have not proved
amenable to feature detection once examined.

Safari, for instance supports the "rowObject.cellIndex" property, but
always returns 0 (zero).

Mick
 
R

Richard Cornford

Mick said:
Safari, for instance supports the "rowObject.cellIndex"
property, but always returns 0 (zero).

Are you saying you cannot work out how to test for that? If two cells in
the same row give the same cellIndex then cellIndex is useless (and if
there are not two cells in the same row it doesn't matter much). And of
course if Safari ever fix the problem it simultaneously starts passing
the test, while browser detection keeps on assuming that cellIndex is
useless (and on any other browser that spoofs Safari, while missing
browsers that have the same problem).

Feature detection is not that difficult, you work out what you need to
know and then work out which questions will tell you the answer, then
you code the questions.

Richard.
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated Sun, 13
Nov 2005 22:27:50, seen in Richard Cornford
Feature detection is not that difficult, you work out what you need to
know and then work out which questions will tell you the answer, then
you code the questions.

ISTM that it might be useful to use "feature detection" as the general
term, comprising such as "method detection", "bug detection", etc.; and
to use also the more specific term when practicable.

Example : IE4 has no native toFixed, and "method detection" detects that
class of browser, as opposed to the class including IE6. IE6 has a
known error in toFixed, sensed by "bug detection". We do not for sure
know how to detect all bugs that it may have, but we do know how to
detect one, and AFAIK know of no other.

Then there's "behaviour detection" - the output of some toString methods
(date) is specified as unspecified by ECMA, and there may be examples
where a specification is interpreted in more than one way though not
specified as such,
 
M

Mick White

Richard said:
Are you saying you cannot work out how to test for that? If two cells in
the same row give the same cellIndex then cellIndex is useless (and if
there are not two cells in the same row it doesn't matter much).

It's easy enough to test for it (once you know it may be problematic).
But I agree, Safari may decide to fix this in future versions, so
sniffing for "Safari" in the UA string is pointless.
I stumbled across this bug whole writing an application, I can find no
documentation from Apple at all.
Mick
 
M

Matt Silberstein

On Sun, 13 Nov 2005 08:36:05 -0600, in comp.lang.javascript , "Matt
Kruse" <[email protected]> in <[email protected]>
wrote:

[snip]
is merely detection, and cannot make any guarantee of correct results.

There is no way to guarantee correct results. You can't even always
know what "correct results" means. This is a stopping problem
question, web based stuff, since you don't control most of the path,
just makes it worse than other systems.
In
fact, a browser could have the feature, but its use could throw an error
every time. Simple "feature detection" can't check that.

Or fail when particular inputs are provided.

[snip]
In the cases where specific browser versions have bugs which cannot be
programmatically deduced by feature detection/verification, checking the
user agent being used (and assuming it's accurate) may allow some
functionality to behave correctly in those browsers also.

In theory. Is this practical? IMNO you could have some "finite" set of
platforms in a table and only run if the system meets some standard.
Of course it is not that easy and not as simple as work/don't work.


[snip]


--
Matt Silberstein

Do something today about the Darfur Genocide

http://www.beawitness.org
http://www.darfurgenocide.org
http://www.savedarfur.org

"Darfur: A Genocide We can Stop"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,282
Latest member
RoseannaBa

Latest Threads

Top