Re: [whatwg] Supporting feature tests of untestable features

On 2015-04-08 14:59, Kyle Simpson wrote:
> Consider just how huge an impact stuff like "caniuse" data is having right now, given that its data is being baked into build-process tools like CSS preprocessors, JS transpilers, etc. Tens of millions of sites are implicitly relying not on real feature tests but on (imperfect) cached test data from manual tests, and then inference matching purely through UA parsing voodoo.
>

Myself I have to confess that I tend to use caniuse a lot myself. I use 
it to check how far back a feature goes in regards to browser versions 
and try to decide where you cut the line In other words I'll end up 
looking at a featyre and thinking that "OK! IE10 supports this feature, 
IE9 does not, so minimum IE target is then IE10).

Then I use that feature and test it in latest (general release) version 
of Firefox, Chrome, IE, Opera, if it relatively looks the same and there 
are no glitches and the code works and so on then I'm satisfied, if I 
happen to have a VM available with a older browsers then I might try 
that too just to confirm what CanIUse states in it's tables.

This still means that I either need to provide a fallback (which means I 
need to test for feature existance) or I need to fail gracefully (which 
might require some user feedback/information so they'll know why 
something does not work).
I do not do use browser specific code as I always try to go for feature 
parity.

Now being able to poke the browser in a standard/official way to ask if 
certain features exists/are available would make this much easier.

As to the issue of certain versions of a browsers having bugs related to 
a feature has absolutely nothing to do with whether that feature is 
supported or not.
Tying feature tests to only bug free features is silly, no idea who here 
first suggested that (certainly hope it wasn't me) but it's stupid.

Is the feature implemented/available? Yes or no. If there are bugs or 
not is irrelevant. A programmer should assume that APIs are bugfree 
regardless.

Just ask Raymond Chen or people on the Windows compatibility team what 
happens when programmers try to detect bugs or rely on bugs, fixing said 
bugs in the OS then suddenly breaks those programs and and extra code is 
needed in the OS to handle those buggy programs.

Relying on user agent strings or similar is just a nest of snakes you do 
not want to rummage around in. HTML5 pages/apps should be browser neutral.


-- 
Roger Hågensen, Freelancer, http://skuldwyrm.no/


-- 
Roger Hågensen, Freelancer, http://skuldwyrm.no/

Received on Wednesday, 8 April 2015 19:11:29 UTC