mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-23 21:56:10 +03:00
add check for missing webgl context in WebGLDrawer.isSupported()
This commit is contained in:
parent
ee6751e02f
commit
37ce7cc256
@ -195,7 +195,7 @@
|
||||
let canvasElement = document.createElement( 'canvas' );
|
||||
let webglContext = $.isFunction( canvasElement.getContext ) &&
|
||||
canvasElement.getContext( 'webgl' );
|
||||
let ext = webglContext.getExtension('WEBGL_lose_context');
|
||||
let ext = webglContext && webglContext.getExtension('WEBGL_lose_context');
|
||||
if(ext){
|
||||
ext.loseContext();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user