UNPKG

modernizr

Version:

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.

23 lines (21 loc) 691 B
/*! { "name": "SVG clip paths", "property": "svgclippaths", "tags": ["svg"], "notes": [{ "name": "Demo", "href": "http://srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg" }] } !*/ /* DOC Detects support for clip paths in SVG (only, not on HTML content). See [this discussion](https://github.com/Modernizr/Modernizr/issues/213) regarding applying SVG clip paths to HTML content. */ define(['Modernizr', 'toStringFn'], function(Modernizr, toStringFn) { Modernizr.addTest('svgclippaths', function() { return !!document.createElementNS && /SVGClipPath/.test(toStringFn.call(document.createElementNS('http://www.w3.org/2000/svg', 'clipPath'))); }); });