1234567891011121314151617181920 |
- /*!
- {
- "name": "Canvas text",
- "property": "canvastext",
- "caniuse": "canvas-text",
- "tags": ["canvas", "graphics"],
- "polyfills": ["canvastext"]
- }
- !*/
- /* DOC
- Detects support for the text APIs for `<canvas>` elements.
- */
- define(['Modernizr', 'createElement', 'test/canvas'], function(Modernizr, createElement) {
- Modernizr.addTest('canvastext', function() {
- if (Modernizr.canvas === false) {
- return false;
- }
- return typeof createElement('canvas').getContext('2d').fillText === 'function';
- });
- });
|