Re: browsers & standards



JRS: In article <dkqhuq02pk8@xxxxxxxxxxxxxxxxx>, dated Tue, 8 Nov 2005
09:58:14, seen in news:comp.lang.javascript, Matt Kruse
<newsgroups@xxxxxxxxxxxxx> posted :
>Dr John Stockton wrote:
>> One may not be able to do object/feature detection.
>> ...
>> <FAQENTRY> to enable sound feature detection on toFixed, ISTM that the
>> FAQ should indicate a test value that can be used to prove toFixed to
>> be good, or at least to have no known error. 0.77.toFixed(0) may be
>> such a test, or a part thereof.
>
>I think most people understand that feature detection can only decide if
>features are available. There is, of course, no way to determine if a
>feature behaves according to standards or expectations.

There is *no* reasonable way to tell reliably whether a feature works as
expected under *all* circumstances. And that applies to *all* features
(remember how Easter Eggs are often invoked).

An anti-French browser writer could, for example, impose a limit on the
number of cedillas on a page. Or 4195835/3145727 might give
1.333739068902037589.



However, where it is known that a particular "error" occurs, and that
error affects more than just rendering, it can easily be tested for.

AIUI, new Date(1e12).getYear() may return any of 2001, 101, 1 (example
of the last requested). It's perfectly easy to test which it gives, and
to adapt operations accordingly (though there are better solutions in
that case).

I think that OK = !!+(0.77.toFixed(0)) is a sound test for the
goodness of toFixed() - but I cannot confirm that, whereas the FAQ
writer might know or ask to be told, and then we could all know.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
.



Relevant Pages

  • Re: browsers & standards
    ... >> One may not be able to do object/feature detection. ... >> FAQ should indicate a test value that can be used to prove toFixed to ... > feature behaves according to standards or expectations. ...
    (comp.lang.javascript)
  • Re: [GIT PATCH] split up feature-removal-schedule.txt
    ... Hmm.. ... If the date/release has been reached and the feature hasn't been removed ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: C/C++ stepping through code...
    ... Player wrote: ... > love to have that feature to aid me in my task... ... it is a feature that the Microsoft IDE offers for ... a.c.l.l.c-c++ FAQ: http://www.comeaucomputing.com/learn/faq ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Project Standard and Analysis Toolbar
    ... > had tried all of those suggestions, except I did not reinstall. ... > guess I wanted to make sure that it was a feature of Project 2002 ... > Standard Edition before trying to reinstall it. ... >> You might like to see FAQ Item: ...
    (microsoft.public.project)
  • Re: Embedding .MID audio file as an OBJECT in PowerPoint
    ... > It would be nice if someone who is familiar with the 'posting' on ... I wrote the FAQ but it's been so long that I no longer remember who posted it or ... If nobody here knows of a workaround, ... includes the feature. ...
    (microsoft.public.powerpoint)