Improve type checking in ol.canvas.SUPPORTED
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
@@ -20,4 +24,4 @@ ol.canvas.SUPPORTED = (function() {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|||||||
Reference in New Issue
Block a user