Improve type checking in WebGL support test
This commit is contained in:
@@ -52,7 +52,11 @@ ol.webgl.getContext = function(canvas, opt_attributes) {
|
||||
* @const
|
||||
* @type {boolean}
|
||||
*/
|
||||
ol.webgl.SUPPORTED = (function() {
|
||||
ol.webgl.SUPPORTED = (
|
||||
/**
|
||||
* @return {boolean} WebGL supported.
|
||||
*/
|
||||
function() {
|
||||
if (!('WebGLRenderingContext' in goog.global)) {
|
||||
return false;
|
||||
}
|
||||
@@ -65,4 +69,4 @@ ol.webgl.SUPPORTED = (function() {
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user