aboutsummaryrefslogtreecommitdiff
path: root/src/library_browser.js
diff options
context:
space:
mode:
authoronnoj <me@onnoj.net>2014-01-03 11:48:31 +0100
committeronnoj <me@onnoj.net>2014-01-03 11:48:31 +0100
commitfe66c89196353e99712993a362c31b1914d07cb2 (patch)
treee07fa83acdf05a16cd32e921a14779f063f425e6 /src/library_browser.js
parent76ba593a1cbd2f55c1bb8966929405b4a47a3185 (diff)
Update library_browser.js
Diffstat (limited to 'src/library_browser.js')
-rw-r--r--src/library_browser.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/library_browser.js b/src/library_browser.js
index 029598f3..e0f53052 100644
--- a/src/library_browser.js
+++ b/src/library_browser.js
@@ -479,16 +479,16 @@ mergeInto(LibraryManager.library, {
var rect = Module["canvas"].getBoundingClientRect();
var x, y;
- //Neither .scrollX or .pageXOffset are defined in a spec, but
- //we prefer .scrollX because it is currently in a spec draft.
- //(see: http://www.w3.org/TR/2013/WD-cssom-view-20131217/)
+ // Neither .scrollX or .pageXOffset are defined in a spec, but
+ // we prefer .scrollX because it is currently in a spec draft.
+ // (see: http://www.w3.org/TR/2013/WD-cssom-view-20131217/)
var scrollX = ((typeof window.scrollX !== 'undefined') ? window.scrollX : window.pageXOffset);
var scrollY = ((typeof window.scrollY !== 'undefined') ? window.scrollY : window.pageYOffset);
- #if ASSERTIONS
- //If this assert lands, it's likely because the browser doesn't support scrollX or pageXOffset
- //and we have no viable fallback.
+#if ASSERTIONS
+ // If this assert lands, it's likely because the browser doesn't support scrollX or pageXOffset
+ // and we have no viable fallback.
assert((typeof scrollX !== 'undefined') && (typeof scrollY !== 'undefined'), 'Unable to retrieve scroll position, mouse positions likely broken.');
- #endif
+#endif
if (event.type == 'touchstart' ||
event.type == 'touchend' ||
event.type == 'touchmove') {