Answer the question
In order to leave comments, you need to log in
How to determine in js if certain functions and/or attributes are supported by the browser?
If you look at the statistics on browsers in Runet in Li, you can see that the top 5 most popular browsers account for just over 60% of users, and this despite the fact that the version is not taken into account for Chrome.
Chrome is slowly gaining a share from Yandex and Mail, some users are probably hiding or replacing user-agent, old versions of browsers still occupy a certain share in total, etc.
That. It seems to me useless to determine the browser by User-Agent, but I want to create cross-browser js that works for the maximum number of users.
In this regard, the question, or rather, even two:
Answer the question
In order to leave comments, you need to log in
Modernizr is good, but it takes up a lot of space (yes, it is possible to make your own build). At one time, I dragged a good solution from here to determine the support for individual attributes.
// @url https://gist.github.com/373874
if ($.support.transition) {
$('html').addClass('csstransitions');
} else {
// fallback
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question