Improve type checking in ol.canvas.SUPPORTED

This commit is contained in:
Tom Payne
2013-12-13 15:51:57 +01:00
parent 8f6952c56c
commit b39ae367e7
+5 -1
View File
@@ -9,7 +9,11 @@ goog.require('goog.dom.TagName');
* @const * @const
* @type {boolean} * @type {boolean}
*/ */
ol.canvas.SUPPORTED = (function() { ol.canvas.SUPPORTED = (
/**
* @return {boolean} Canvas supported.
*/
function() {
if (!('HTMLCanvasElement' in goog.global)) { if (!('HTMLCanvasElement' in goog.global)) {
return false; return false;
} }