Skip to content

Commit

Permalink
Moving canvastext test to feature-detects/canvastext.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rupl committed Sep 20, 2012
1 parent 137c89f commit 25fec3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions feature-detects/canvastext.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

// Canvas text

Modernizr.addTest('canvastext',
(Modernizr.canvastext = !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function')))
);
6 changes: 0 additions & 6 deletions modernizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,6 @@ window.Modernizr = (function( window, document, undefined ) {
* -----
*/

// Canvas text

tests['canvastext'] = function() {
return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function'));
};

// webk.it/70117 is tracking a legit WebGL feature detect proposal

// We do a soft detect which may false positive in order to avoid
Expand Down

0 comments on commit 25fec3c

Please sign in to comment.