mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-17 15:11:04 +00:00
21 lines
522 B
JavaScript
21 lines
522 B
JavaScript
/*!
|
|
{
|
|
"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';
|
|
});
|
|
});
|