We've been over that. It doesn't count as it's not for elements.
To be completely accurate, I should have said it is worthless for
elements.
See the pattern there.
activation events, mutation events. There
Like the ones that start with "DOM". Apparently those are not
implemented with DOM0 interfaces.
LOL. You never stop, do you? Just noticed that my attribute trick
(which is what makes that function work) has been copied by ExtJS
(without crediting anyone), which makes it a clean sweep of the
"major" libraries I think. And yes, most credit the invention to
Kangax.
http://www.cinsoft.net/host.html
Furthermore, it occurs to me that (once again), people are copying and
pasting one of my functions and complaining of "problems" because they
simply don't understand it.
Back when I first schooled you, Peter, etc. on this technique, I am
quite sure I mentioned that it could only reliably detect *DOM0*
support on elements. Inferring anything else (e.g. DOM2 support) was
specifically warned against.
It's pretty funny that scatter-shot observational reports of
"problems" with events that don't support DOM0 at all (and all
starting with the "DOM" prefix) have been trickling in. Stop using
the thing to make bad infernces and you can put the diaries away.
And, could it be that all of these "DOM" prefixed events were
introduced later than DOM0. Check the specs:-
http://www.w3.org/TR/DOM-Level-2-Events/events.html
Yes, what a shock. Case closed.
Note to Kangax, as most people are getting this function from your
blog, please update to stress that inferences about anything other
than DOM0 events are weak. And clearly the ones that are prefixed
with "DOM" are right out.
So what would be a good use of the function? Perhaps if you can spot
touchstart/end, but *not* mousemove, you might implement drag and drop
with touch events (if you are into such things). And to be sure, you
would use the DOM0 interfaces to do it. Why is this a better
example? Because we know mousemove existed in DOM0 and there
certainly won't be a false *positive* regarding the proprietary touch
events.
So, just like with isHost* (and others we've discussed recently) you
actually have to think about what you are doing/testing. These aren't
magic boxes. If you expect to get magical results from them, you will
be disappointed every time. Furthermore, if you think you can write
magic functions, you will fail every time.
HTH