Re: Cross-browser setOpacity() without browser sniffing?



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.


.



Relevant Pages

  • Re: Graphic GUI C
    ... features in C99) is also a feature of C++. ... expect the C language and the C standard library to do everything; ... nothing is more commonplace than the need for one or more libraries in ... The same is true inside of WSH where all of the functionality ...
    (comp.lang.c)
  • Re: Suggestions For Final Release WMP11
    ... down button that used to be next to now playing. ... will live in their libraries was the idea but it gives the choice not to. ... Allow the User to remove the top part of the list pane (with the album ... Allow the Video thumbnails (very useful and nice feature by the way!) ...
    (microsoft.public.windowsmedia)
  • Re: Suggestions For Final Release WMP11
    ... I also want the now playing to remember the last files in its playlist ... will live in their libraries was the idea but it gives the choice not to. ... Allow the User to remove the top part of the list pane (with the album ... Allow the Video thumbnails (very useful and nice feature by the way!) ...
    (microsoft.public.windowsmedia)
  • Re: Something like "ping" for windows messages.
    ... The third-party socket libraries I know of come with source (in a couple cases it's an ... But the CMutex layer didn't allow you to change that feature ... And what does a defective design of synchronization primitives relate to the ... solution is to buy a third-party socket libary that is designed to be portable. ...
    (microsoft.public.vc.mfc)
  • Re: Too much builtins (was Re: Pythons simplicity philosophy
    ... then you shouldn't be programming! ... >> and powerful feature with a slew of specific, ... to determine this by searching though the libraries, ... Moving things closer to the core may increase the efficiency of the ...
    (comp.lang.python)