mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-18 07:31:04 +00:00
28 lines
803 B
JavaScript
28 lines
803 B
JavaScript
/*!
|
|
{
|
|
"name": "Inline SVG",
|
|
"property": "inlinesvg",
|
|
"caniuse": "svg-html5",
|
|
"tags": ["svg"],
|
|
"notes": [{
|
|
"name": "Test page",
|
|
"href": "https://paulirish.com/demo/inline-svg"
|
|
}, {
|
|
"name": "Test page and results",
|
|
"href": "https://codepen.io/eltonmesquita/full/GgXbvo/"
|
|
}],
|
|
"polyfills": ["inline-svg-polyfill"],
|
|
"knownBugs": ["False negative on some Chromia browsers."]
|
|
}
|
|
!*/
|
|
/* DOC
|
|
Detects support for inline SVG in HTML (not within XHTML).
|
|
*/
|
|
define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
|
|
Modernizr.addTest('inlinesvg', function() {
|
|
var div = createElement('div');
|
|
div.innerHTML = '<svg/>';
|
|
return (typeof SVGRect !== 'undefined' && div.firstChild && div.firstChild.namespaceURI) === 'http://www.w3.org/2000/svg';
|
|
});
|
|
});
|