How can I check, with JavaScript, whether cursor:none
is supported?
Simply create an element, set the property, and check whether the property is still existent.
function isCursorNoneSupported() {
var a = document.createElement("a");
a.style.cursor = "none";
return a.style.cursor === 'none';
}
if ( isCursorNoneSupported() ) {
alert("cursor:none is supported!");
} else {
alert("cursor:none is not supported :(");
}
To check which browsers support cursor:none
, have a look at: cursor
Browser compatibility
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With