Re: Cross-browser setOpacity() without browser sniffing?
- From: "Richard Cornford" <Richard@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 7 Sep 2006 09:35:39 +0100
petermichaux@xxxxxxxxx wrote:
Richard Cornford wrote:<snip>
It would be enough to observe that in browser supporting -
style.filter - ...
Great solution. Of course I didn't know about that trick.
Where is the list of all these feature tests?
There is (and could never be) a list of feature detection tests. Feature
detection is a strategy with a method; you analyse the problem to pin
down the question that needs to be answered and the test that answers
that question in the most direct way (preferably with a one-to-one
relationship to the issue) will then usually be obvious. So, you want to
know when applying - style.filters - is meaningful so you test for
manifestations of - style.filters -, and you also want to put up other
scripts writing to - style.filters - on arbitrary elements so you test
the feature on an element that nobody (sane) would assign a filter to.
I doubt they thought of that test
So do I, but I think that they failed to think of that test because
instead of learning to do browser scripting well they have decided to
hide behind browser sniffing and 'mostly works'.
but perhaps some documents they are
considering don't even have a title element.
The TITLE element is the only element that is _required_ in a valid HTML
document. And they are error-corrected into existence if omitted on
actual browsers (including IE).
<snip>
On the other hand I suppose there is a possibility that a
separate sub-system may have been assigning other filters
(say drop-shadows), but then the Yahoo opacity mechanism
would screw that up anyway by wiping the other filter as it
assigned its opacity filter.
I mentioned this to the author and he wants to change this
eventually.
So I was correct in assuming that he had not thought through the issues
he was claiming to be acting to mitigate.
They are actually quite interested in the thoughts of others
and want the library to be good.
Even if the thoughts of others are that the style of library manifest is
inappropriate for browser scripting and so can never be 'good'? I think
Yahoo's libraries are in fact only a self-promotion exercise leveraged
off work they would otherwise have to do for themselves internally, so
the only actual intention is to avoid being subject to criticism for
creating faulty code.
Remember that because yahoo use 100% of their code themselves for them
it is an application specific framework not a general purpose library.
I think they might be developing under time
pressure and not be able to revist the code they want to.
Or it already does what Yahoo want it to do internally so additional
development is only worthwhile when it is to remove obvious subjects for
the criticism that would diminish its potential as a (cheep) promotional
exercise.
Richard.
.
- References:
- Cross-browser setOpacity() without browser sniffing?
- From: petermichaux
- Re: Cross-browser setOpacity() without browser sniffing?
- From: Richard Cornford
- Re: Cross-browser setOpacity() without browser sniffing?
- From: petermichaux
- Re: Cross-browser setOpacity() without browser sniffing?
- From: Richard Cornford
- Re: Cross-browser setOpacity() without browser sniffing?
- From: petermichaux
- Re: Cross-browser setOpacity() without browser sniffing?
- From: Richard Cornford
- Re: Cross-browser setOpacity() without browser sniffing?
- From: petermichaux
- Re: Cross-browser setOpacity() without browser sniffing?
- From: Richard Cornford
- Re: Cross-browser setOpacity() without browser sniffing?
- From: petermichaux
- Cross-browser setOpacity() without browser sniffing?
- Prev by Date: Re: How to capture and alert the value of an xhtml node using JS
- Next by Date: Re: feature detection to replace use of "navigator.userAgent" in Yahoo! UI event.js?
- Previous by thread: Re: Cross-browser setOpacity() without browser sniffing?
- Next by thread: Re: Cross-browser setOpacity() without browser sniffing?
- Index(es):
Relevant Pages
|