RobG said:
It seems you've completely missed the point of my OP.
OK, I am ready to follow it over again.
The code you originally posted will fail in any browser that is not IE
and doesn't support textContent. There are plenty of those, such as
Safari 2.
This is a false statement (I mean "plenty of those") and you know it.
The current amount of Safari 2.x users is equal to the current amount
of Netscape 4.x users thus so negligible that is not reflected by any
known market share stats service, so >0.01%
At the same time the current amount of IE6 users is bigger than the
amount of users of all versions of FF together (24%-25% per region).
The secret of this phenomenon is in the "netbook explosion" on the
market with Windows XP SP2 + IE6 preinstalled.
This is the old lasting silliness of clj we're going to say bye-bye:
create most stupid imaginary compatibility problems yet disregard some
most practical ones as soon as "pure feature detection" cannot handle
them.
Of course any stats numbers never prove anything to some clj regulars
as unreliable, easily spoofed, blah-blah-blah etc. but for other
readers some sample stats:
http://marketshare.hitslink.com/browser-market-share.aspx?qprid=0
http://marketshare.hitslink.com/browser-market-share.aspx?qprid=2
Used methodology:
http://marketshare.hitslink.com/
You are trying to push browser sniffing in a forum that wrote it off
as a flawed strategy many years ago.
It is a false statement as well. What was rightly wrote off is the
code branching based purely on User-Agent string examination. The rest
is a hoax just like "DIV layout", "semantical Web", XHTML and many
other things to forget and to move on. IMHO it is also a long lasting
hypocrisy when
/*@cc_on
/*@if (@_jscript)
var IE = true;
@else @*/
var IE = false;
/*@end
@*/
is really bad because we dare to name the browser we are detecting
while
if (window.ActiveXObject) { ... }
is good because we like not naming anything, just "any browser with
this feature"...
So that's your angle. Instead of writing robust code, you'd write
stuff that will break outside your supported list, then charge an
exorbitant fee to support some other browser.
No, and it is clear if you follow the modern Web trends. I am writing
code that tested to work for 99.9% of current environments - that
automatically includes the legacy systems holding up to 0.1% of the
market share.
If my customer needs to support an environment with 0.09%-0.01% of
market shares than it is obviously an individual custom adjustment for
an extra pay. It is natural to understand to both the vendor and the
customer. To make it clearer, a standard furniture set may cost you
$1000 but the same set separately made for your room dimensions and
shape may cost you as much as $5,000