+ /**
+ * Detect if the browser supports SVG.
+ *
+ * @since 4.6.0
+ *
+ * @return {Boolean} True if the browser supports svg, false if not.
+ */
+ function browserSupportsSvgAsImage() {
+ if ( !! document.implementation.hasFeature ) {
+ // Source: Modernizr
+ // https://github.com/Modernizr/Modernizr/blob/master/feature-detects/svg/asimg.js
+ return document.implementation.hasFeature( 'http://www.w3.org/TR/SVG11/feature#Image', '1.1' );
+ }
+
+ // document.implementation.hasFeature is deprecated. It can be presumed
+ // if future browsers remove it, the browser will support SVGs as images.
+ return true;
+ }
+