Browse Source

Add inline SVG feature detection

pm2
Luke Childs 8 years ago
parent
commit
3c17c82290
  1. 11
      public/assets/enhancements.js

11
public/assets/enhancements.js

@ -12,6 +12,17 @@
supports.localStorage = false;
}
// Detect inline SVG support
supports.inlineSVG = (function() {
const div = document.createElement('div');
div.innerHTML = '<svg/>';
return (
typeof SVGRect != 'undefined'
&& div.firstChild
&& div.firstChild.namespaceURI
) == 'http://www.w3.org/2000/svg';
})();
// Add ios class to body on iOS devices
function iosBodyClass() {
if(

Loading…
Cancel
Save