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

Fix: Prevent WebGL error when prefetching Preview.js #82

Merged
merged 2 commits into from
Apr 18, 2017
Merged

Fix: Prevent WebGL error when prefetching Preview.js #82

merged 2 commits into from
Apr 18, 2017

Conversation

jeremypress
Copy link
Contributor

No description provided.

@@ -163,6 +163,11 @@ class Browser {
static hasWebGL() {
if (!gl) {
const canvas = document.createElement('canvas');
canvas.addEventListener('webglcontextlost', (e) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a comment for what this is for

canvas.addEventListener('webglcontextlost', (e) => {
e.preventDefault();
e.stopPropagation();
}, false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't need the false, it defaults to that

@@ -44,6 +28,29 @@ class Logger {
}

/**
* Gets browser compatibility information.
*
* @return {object}
Copy link
Contributor

Choose a reason for hiding this comment

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

@return {Object} Browser capability information

@jeremypress jeremypress merged commit e0a420a into box:master Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants