I would like to test the browser for support of the transitionend event, I can achieve this quite easily by doing:
var isSupported = 'ontransitionend' in window;
However this doesn’t work in firefox and is a well known problem. I found the following blog post describing a solution to this here: Detecting event support without browser sniffing however I have been unable to get this solution to successfully test for transitionend either.
The issue is that while this works for most events like ‘onclick’ this doesn’t seem to work for the transitionend event and I cannot find a solution that does work. I created a fiddle to show this in action, it first tests for the onclick event to demonstrate the technique works, then uses the same technique for transitionend.
Onclick returns true but ontransitionend returns false despite browser support being available.