We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aca52cb commit e87d3e1Copy full SHA for e87d3e1
src/RenderWebGL.js
@@ -97,8 +97,12 @@ class RenderWebGL extends EventEmitter {
97
*/
98
static isSupported (optCanvas) {
99
try {
100
- // Create the context the same way that the constructor will: attributes may make the difference.
101
- return !!RenderWebGL._getContext(optCanvas || document.createElement('canvas'));
+ optCanvas = optCanvas || document.createElement('canvas');
+ const options = {alpha: false, stencil: true, antialias: false};
102
+ return !!(
103
+ optCanvas.getContext('webgl', options) ||
104
+ optCanvas.getContext('experimental-webgl', options)
105
+ );
106
} catch (e) {
107
return false;
108
}
0 commit comments