aboutsummaryrefslogtreecommitdiff
path: root/src/library_html5.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/library_html5.js')
-rw-r--r--src/library_html5.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/library_html5.js b/src/library_html5.js
index a38c2390..e9b9c278 100644
--- a/src/library_html5.js
+++ b/src/library_html5.js
@@ -236,10 +236,10 @@ var LibraryJSEvents = {
var handlerFunc = function(event) {
var e = event || window.event;
JSEvents.fillMouseEventData(JSEvents.wheelEvent, e);
- {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaX, 'e.deltaX', 'double') }}}
- {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaY, 'e.deltaY', 'double') }}}
- {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaZ, 'e.deltaZ', 'double') }}}
- {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaMode, 'e.deltaMode', 'i32') }}}
+ {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaX, 'e.deltaX', 'double') }}};
+ {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaY, 'e.deltaY', 'double') }}};
+ {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaZ, 'e.deltaZ', 'double') }}};
+ {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaMode, 'e.deltaMode', 'i32') }}};
var shouldCancel = Runtime.dynCall('iiii', callbackfunc, [eventTypeId, JSEvents.wheelEvent, userData]);
if (shouldCancel) {
e.preventDefault();
@@ -772,7 +772,8 @@ var LibraryJSEvents = {
var confirmationMessage = Runtime.dynCall('iiii', callbackfunc, [eventTypeId, 0, userData]);
- confirmationMessage = Pointer_stringify(confirmationMessage);
+ if (confirmationMessage)
+ confirmationMessage = Pointer_stringify(confirmationMessage);
if (confirmationMessage) {
e.preventDefault();
e.returnValue = confirmationMessage;