aboutsummaryrefslogtreecommitdiff
path: root/src/library_browser.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-02-20 17:57:27 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-02-20 17:57:27 -0800
commitaf22db83d85e820642495a898cf4e176168ff20b (patch)
tree91da9d81de47388de3bf836520b3cba89d957944 /src/library_browser.js
parent9d0d878e86e7cf679e2fcbaec3edcbb2ff78599c (diff)
parentd4edc4c8614d43d3b46c6d01bbc00bd00835587e (diff)
Merge pull request #2143 from waywardmonkeys/strict-fixes
Strict fixes
Diffstat (limited to 'src/library_browser.js')
-rw-r--r--src/library_browser.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library_browser.js b/src/library_browser.js
index 46082281..b800292c 100644
--- a/src/library_browser.js
+++ b/src/library_browser.js
@@ -234,6 +234,10 @@ mergeInto(LibraryManager.library, {
}
#endif
var ctx;
+ var errorInfo = '?';
+ function onContextCreationError(event) {
+ errorInfo = event.statusMessage || errorInfo;
+ }
try {
if (useWebGL) {
var contextAttributes = {
@@ -251,10 +255,6 @@ mergeInto(LibraryManager.library, {
contextAttributes.preserveDrawingBuffer = true;
#endif
- var errorInfo = '?';
- function onContextCreationError(event) {
- errorInfo = event.statusMessage || errorInfo;
- }
canvas.addEventListener('webglcontextcreationerror', onContextCreationError, false);
try {
['experimental-webgl', 'webgl'].some(function(webglId) {