JSFiddle - React, Tailwind, and code Playground
by jack_pallot
CSS
.hasSvg {
background: red;
}
.noSvg {
background: orange;
}
JavaScript
(function(){
var checkSvg = function() {
return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image", "1.1");
}
if (!checkSvg()) {
document.body.className+=' noSvg';
}
else {
document.body.className+=' hasSvg';
}
})();