Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some no-op code in webgl.js #2318

Merged
merged 1 commit into from May 31, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 1 addition & 6 deletions feature-detects/webgl.js
Expand Up @@ -7,13 +7,8 @@
"polyfills": ["jebgl", "cwebgl", "iewebgl"]
}
!*/
define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('webgl', function() {
var canvas = createElement('canvas');
var supports = 'probablySupportsContext' in canvas ? 'probablySupportsContext' : 'supportsContext';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is supportsConext also removed or why did you delete it too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was the original name of the feature, so yes, it's also removed: whatwg/html@2542a12.

if (supports in canvas) {
return canvas[supports]('webgl') || canvas[supports]('experimental-webgl');
}
return 'WebGLRenderingContext' in window;
});
});