How to test browser support for a background clip: text?

How would you test the value of background-clip: text, webkit supports text, but mozilla and other browsers I did not try modernizr teststyles, but no luck

+4
source share
1 answer
var testEl = document.createElement( "x-test" ); var supportsWebkitBackgroundClipText = typeof testEl.style.webkitBackgroundClip !== "undefined" && ( testEl.style.webkitBackgroundClip = "text", testEl.style.webkitBackgroundClip === "text" ); 
+6
source

All Articles