
static.js.vendor.modernizr.feature-detects.svg.asimg.js Maven / Gradle / Ivy
The newest version!
/*!
{
"name": "SVG as an
tag source",
"property": "svgasimg",
"caniuse" : "svg-img",
"tags": ["svg"],
"authors": ["Chris Coyier"],
"notes": [{
"name": "HTML5 Spec",
"href": "http://www.w3.org/TR/html5/embedded-content-0.html#the-img-element"
}]
}
!*/
define(['Modernizr', 'addTest'], function(Modernizr) {
// Original Async test by Stu Cox
// https://gist.github.com/chriscoyier/8774501
// Now a Sync test based on good results here
// http://codepen.io/chriscoyier/pen/bADFx
// Note http://www.w3.org/TR/SVG11/feature#Image is *supposed* to represent
// support for the `` tag in SVG, not an SVG file linked from an `
`
// tag in HTML – but it’s a heuristic which works
Modernizr.addTest('svgasimg', document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#Image', '1.1'));
});
© 2015 - 2025 Weber Informatics LLC | Privacy Policy