Answer the question
In order to leave comments, you need to log in
Is there such a script that determines if the browser supports a certain property and adds prefixes?
Let's say there is a controversial css property transform. There are simply too many places where this property pops up. The point is speed. Why do users with modern browsers need unnecessary prefixes when just the name "transform" will do. Here the script should check whether the browser supports a certain css property, if not, then it adds the necessary prefix. If yes, then it adds nothing))) Somewhere I saw this script. Maybe someone knows))) It is in the javascript code itself, not css. So that there are no unnecessary questions, what does the script do. It checks once whether the browser supports transform and, if not, adds the necessary prefix to all transforms in the JAVASCRIPT file. It is in js. Not css. There is no way to change classes if someone wants to suggest the "best option". The value is calculated.
Answer the question
In order to leave comments, you need to log in
I will assume that ctx is created before the #canvas element appears in the DOM.
Well, there is no onmousedown event, there is mousedown.
Now think about those poor bastards who, in addition to using flawed browsers, also have to process the CSS for every request to your site. And for what? so that users of normal browsers could save half a kilobyte. gzip eliminates a bunch of duplication in css and the difference in terms of css parsing time is negligible.
So we pick up autoprefixer and do precompilation on the server, + serve in gzip + caching.
--- updated ---
Sorry, I messed up with transform in css files.
I can’t offer anything for js, only this:
www.kirupa.com/html5/vendor_prefixes_javascript.htm
Why do you think the script will run faster than the CSS will be processed?
Absolute nonsense.
The only normal solution is to write css (bonus for preprocessors) + autoprefixer.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question