Skip to content

Commit

Permalink
Move svgclippaths test to feature-detects/svgclippaths.js
Browse files Browse the repository at this point in the history
  • Loading branch information
seutje committed Sep 21, 2012
1 parent 0efde41 commit 1b2a255
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
10 changes: 10 additions & 0 deletions feature-detects/svg-clippaths.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

// This test is only for clip paths in SVG proper, not clip paths on HTML content
// demo: srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg

// However read the comments to dig into applying SVG clippaths to HTML content here:
// github.com/Modernizr/Modernizr/issues/213#issuecomment-1149491
Modernizr.addTest('svgclippaths', function() {
return !!document.createElementNS &&
/SVGClipPath/.test(toString.call(document.createElementNS('http://www.w3.org/2000/svg', 'clipPath')));
});
9 changes: 0 additions & 9 deletions modernizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -717,15 +717,6 @@ window.Modernizr = (function( window, document, undefined ) {
return !!document.createElementNS && /SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate')));
};

// This test is only for clip paths in SVG proper, not clip paths on HTML content
// demo: srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg

// However read the comments to dig into applying SVG clippaths to HTML content here:
// github.com/Modernizr/Modernizr/issues/213#issuecomment-1149491
tests['svgclippaths'] = function() {
return !!document.createElementNS && /SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath')));
};

/*>>webforms*/
// input features and input types go directly onto the ret object, bypassing the tests loop.
// Hold this guy to execute in a moment.
Expand Down

0 comments on commit 1b2a255

Please sign in to comment.