From 2682813a66933397c448fa0a1ce0b15fa2d02785 Mon Sep 17 00:00:00 2001 From: stas-badzi Date: Thu, 25 Jun 2026 20:16:34 +0200 Subject: [PATCH 1/7] add a contextmenu mouse callback --- package-lock.json | 50 +++++++++++-------- src/lib/libhtml5.js | 5 ++ src/lib/libsigs.js | 1 + src/struct_info.json | 1 + src/struct_info_generated.json | 1 + src/struct_info_generated_wasm64.json | 1 + system/include/emscripten/html5.h | 3 ++ test/browser/test_html5_core.c | 4 +- test/browser/test_html5_gamepad.c | 2 +- .../browser/test_html5_unknown_event_target.c | 1 + .../test_codesize_hello_dylink_all.json | 1 + test/test_keyboard_codes.c | 2 +- 12 files changed, 47 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 527fb524b79a8..45d4b36f0750c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,7 @@ "requires": true, "packages": { "": { + "name": "emscripten", "dependencies": { "acorn": "^8.16.0", "acorn-import-phases": "^1.0.4", @@ -1451,11 +1452,10 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", + "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1946,16 +1946,15 @@ } }, "node_modules/eslint/node_modules/brace-expansion": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.2.tgz", - "integrity": "sha512-Pdk8c9poy+YhOgVWw1JNN22/HcivgKWwpxKq04M/jTmHyCZn12WPJebZxdjSa5TmBqISrUSgNYU3eRORljfCCw==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", + "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^4.0.2" }, "engines": { - "node": "20 || >=22" + "node": "18 || 20 || >=22" } }, "node_modules/eslint/node_modules/eslint-visitor-keys": { @@ -2237,11 +2236,10 @@ } }, "node_modules/flatted": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", - "dev": true, - "license": "ISC" + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", + "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", + "dev": true }, "node_modules/fsevents": { "version": "2.3.3", @@ -2623,11 +2621,20 @@ } }, "node_modules/js-yaml": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", - "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", + "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", "dev": true, - "license": "MIT", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], "dependencies": { "argparse": "^2.0.1" }, @@ -3238,11 +3245,10 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.6" }, diff --git a/src/lib/libhtml5.js b/src/lib/libhtml5.js index 32ddfa21f4e89..bd98aabdd454f 100644 --- a/src/lib/libhtml5.js +++ b/src/lib/libhtml5.js @@ -583,6 +583,11 @@ var LibraryHTML5 = { emscripten_set_mouseout_callback_on_thread: (target, userData, useCapture, callbackfunc, targetThread) => registerMouseEventCallback(target, userData, useCapture, callbackfunc, {{{ cDefs.EMSCRIPTEN_EVENT_MOUSEOUT }}}, "mouseout", targetThread), + emscripten_set_contextmenu_callback_on_thread__proxy: 'sync', + emscripten_set_contextmenu_callback_on_thread__deps: ['$registerMouseEventCallback'], + emscripten_set_contextmenu_callback_on_thread: (target, userData, useCapture, callbackfunc, targetThread) => + registerMouseEventCallback(target, userData, useCapture, callbackfunc, {{{ cDefs.EMSCRIPTEN_EVENT_CONTEXTMENU }}}, "contextmenu", targetThread), + // HTML5 does not really have a polling API for mouse events, so implement one // manually by returning the data from the most recently received event. This // requires that user has registered at least some no-op function as an event diff --git a/src/lib/libsigs.js b/src/lib/libsigs.js index ae52c8eb1f15d..a96d9a1a59b46 100644 --- a/src/lib/libsigs.js +++ b/src/lib/libsigs.js @@ -788,6 +788,7 @@ sigs = { emscripten_set_mouseout_callback_on_thread__sig: 'ippipp', emscripten_set_mouseover_callback_on_thread__sig: 'ippipp', emscripten_set_mouseup_callback_on_thread__sig: 'ippipp', + emscripten_set_contextmenu_callback_on_thread__sig: 'ippipp', emscripten_set_orientationchange_callback_on_thread__sig: 'ipipp', emscripten_set_pointerlockchange_callback_on_thread__sig: 'ippipp', emscripten_set_pointerlockerror_callback_on_thread__sig: 'ippipp', diff --git a/src/struct_info.json b/src/struct_info.json index f4ecbc84811a3..2e3acd983528f 100644 --- a/src/struct_info.json +++ b/src/struct_info.json @@ -824,6 +824,7 @@ "EMSCRIPTEN_EVENT_MOUSEOUT", "EMSCRIPTEN_EVENT_CANVASRESIZED", "EMSCRIPTEN_EVENT_POINTERLOCKERROR", + "EMSCRIPTEN_EVENT_CONTEXTMENU", "EMSCRIPTEN_RESULT_SUCCESS", "EMSCRIPTEN_RESULT_DEFERRED", diff --git a/src/struct_info_generated.json b/src/struct_info_generated.json index c946883c44794..4647884f9b592 100644 --- a/src/struct_info_generated.json +++ b/src/struct_info_generated.json @@ -144,6 +144,7 @@ "EMSCRIPTEN_EVENT_KEYDOWN": 2, "EMSCRIPTEN_EVENT_KEYPRESS": 1, "EMSCRIPTEN_EVENT_KEYUP": 3, + "EMSCRIPTEN_EVENT_CONTEXTMENU": 39, "EMSCRIPTEN_EVENT_MOUSEDOWN": 5, "EMSCRIPTEN_EVENT_MOUSEENTER": 33, "EMSCRIPTEN_EVENT_MOUSELEAVE": 34, diff --git a/src/struct_info_generated_wasm64.json b/src/struct_info_generated_wasm64.json index 399843f16e941..d404fb01914c4 100644 --- a/src/struct_info_generated_wasm64.json +++ b/src/struct_info_generated_wasm64.json @@ -144,6 +144,7 @@ "EMSCRIPTEN_EVENT_KEYDOWN": 2, "EMSCRIPTEN_EVENT_KEYPRESS": 1, "EMSCRIPTEN_EVENT_KEYUP": 3, + "EMSCRIPTEN_EVENT_CONTEXTMENU": 39, "EMSCRIPTEN_EVENT_MOUSEDOWN": 5, "EMSCRIPTEN_EVENT_MOUSEENTER": 33, "EMSCRIPTEN_EVENT_MOUSELEAVE": 34, diff --git a/system/include/emscripten/html5.h b/system/include/emscripten/html5.h index 11a1ebe7bbd65..15dd52ac8604c 100644 --- a/system/include/emscripten/html5.h +++ b/system/include/emscripten/html5.h @@ -70,6 +70,7 @@ extern "C" { #define EMSCRIPTEN_EVENT_MOUSEOUT 36 #define EMSCRIPTEN_EVENT_CANVASRESIZED 37 #define EMSCRIPTEN_EVENT_POINTERLOCKERROR 38 +#define EMSCRIPTEN_EVENT_CONTEXTMENU 39 #define EMSCRIPTEN_EVENT_TARGET_INVALID 0 #define EMSCRIPTEN_EVENT_TARGET_DOCUMENT ((const char*)1) @@ -142,6 +143,7 @@ EMSCRIPTEN_RESULT emscripten_set_mouseenter_callback_on_thread(const char * _Non EMSCRIPTEN_RESULT emscripten_set_mouseleave_callback_on_thread(const char * _Nonnull target, void *userData, bool useCapture, em_mouse_callback_func callback, pthread_t targetThread); EMSCRIPTEN_RESULT emscripten_set_mouseover_callback_on_thread(const char * _Nonnull target, void *userData, bool useCapture, em_mouse_callback_func callback, pthread_t targetThread); EMSCRIPTEN_RESULT emscripten_set_mouseout_callback_on_thread(const char * _Nonnull target, void *userData, bool useCapture, em_mouse_callback_func callback, pthread_t targetThread); +EMSCRIPTEN_RESULT emscripten_set_contextmenu_callback_on_thread(const char * _Nonnull target, void *userData, bool useCapture, em_mouse_callback_func callback, pthread_t targetThread); EMSCRIPTEN_RESULT emscripten_get_mouse_status(EmscriptenMouseEvent * _Nonnull mouseState); @@ -440,6 +442,7 @@ EMSCRIPTEN_RESULT emscripten_html5_remove_event_listener(const char * _Nonnull t #define emscripten_set_mouseleave_callback(target, userData, useCapture, callback) emscripten_set_mouseleave_callback_on_thread( (target), (userData), (useCapture), (callback), EM_CALLBACK_THREAD_CONTEXT_CALLING_THREAD) #define emscripten_set_mouseover_callback(target, userData, useCapture, callback) emscripten_set_mouseover_callback_on_thread( (target), (userData), (useCapture), (callback), EM_CALLBACK_THREAD_CONTEXT_CALLING_THREAD) #define emscripten_set_mouseout_callback(target, userData, useCapture, callback) emscripten_set_mouseout_callback_on_thread( (target), (userData), (useCapture), (callback), EM_CALLBACK_THREAD_CONTEXT_CALLING_THREAD) +#define emscripten_set_contextmenu_callback(target, userData, useCapture, callback) emscripten_set_contextmenu_callback_on_thread( (target), (userData), (useCapture), (callback), EM_CALLBACK_THREAD_CONTEXT_CALLING_THREAD) #define emscripten_set_wheel_callback(target, userData, useCapture, callback) emscripten_set_wheel_callback_on_thread( (target), (userData), (useCapture), (callback), EM_CALLBACK_THREAD_CONTEXT_CALLING_THREAD) #define emscripten_set_resize_callback(target, userData, useCapture, callback) emscripten_set_resize_callback_on_thread( (target), (userData), (useCapture), (callback), EM_CALLBACK_THREAD_CONTEXT_CALLING_THREAD) #define emscripten_set_scroll_callback(target, userData, useCapture, callback) emscripten_set_scroll_callback_on_thread( (target), (userData), (useCapture), (callback), EM_CALLBACK_THREAD_CONTEXT_CALLING_THREAD) diff --git a/test/browser/test_html5_core.c b/test/browser/test_html5_core.c index f10152f55da2b..c124bcd6ec12b 100644 --- a/test/browser/test_html5_core.c +++ b/test/browser/test_html5_core.c @@ -15,7 +15,7 @@ static inline const char *emscripten_event_type_to_string(int eventType) { const char *events[] = { "(invalid)", "(none)", "keypress", "keydown", "keyup", "click", "mousedown", "mouseup", "dblclick", "mousemove", "wheel", "resize", "scroll", "blur", "focus", "focusin", "focusout", "deviceorientation", "devicemotion", "orientationchange", "fullscreenchange", "pointerlockchange", "visibilitychange", "touchstart", "touchend", "touchmove", "touchcancel", "gamepadconnected", "gamepaddisconnected", "beforeunload", - "batterychargingchange", "batterylevelchange", "webglcontextlost", "webglcontextrestored", "mouseenter", "mouseleave", "mouseover", "mouseout", "(invalid)" }; + "batterychargingchange", "batterylevelchange", "webglcontextlost", "webglcontextrestored", "mouseenter", "mouseleave", "mouseover", "mouseout", "canvasresized", "pointerlockerror", "contextmenu", "(invalid)" }; ++eventType; if (eventType < 0) eventType = 0; if (eventType >= sizeof(events)/sizeof(events[0])) eventType = sizeof(events)/sizeof(events[0])-1; @@ -273,6 +273,8 @@ int main() { ASSERT_RESULT(emscripten_set_mouseover_callback); ret = emscripten_set_mouseout_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, 0, 1, mouse_callback); ASSERT_RESULT(emscripten_set_mouseout_callback); + ret = emscripten_set_contextmenu_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, 0, 1, mouse_callback); + ASSERT_RESULT(emscripten_set_contextmenu_callback); ret = emscripten_set_wheel_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, 0, 1, wheel_callback); ASSERT_RESULT(emscripten_set_wheel_callback); diff --git a/test/browser/test_html5_gamepad.c b/test/browser/test_html5_gamepad.c index 42482cc30ba23..a65ca93ca4355 100644 --- a/test/browser/test_html5_gamepad.c +++ b/test/browser/test_html5_gamepad.c @@ -14,7 +14,7 @@ static inline const char *emscripten_event_type_to_string(int eventType) { const char *events[] = { "(invalid)", "(none)", "keypress", "keydown", "keyup", "click", "mousedown", "mouseup", "dblclick", "mousemove", "wheel", "resize", "scroll", "blur", "focus", "focusin", "focusout", "deviceorientation", "devicemotion", "orientationchange", "fullscreenchange", "pointerlockchange", "visibilitychange", "touchstart", "touchend", "touchmove", "touchcancel", "gamepadconnected", "gamepaddisconnected", "beforeunload", - "batterychargingchange", "batterylevelchange", "webglcontextlost", "webglcontextrestored", "mouseenter", "mouseleave", "mouseover", "mouseout", "(invalid)" }; + "batterychargingchange", "batterylevelchange", "webglcontextlost", "webglcontextrestored", "mouseenter", "mouseleave", "mouseover", "mouseout", "canvasresized", "pointerlockerror", "contextmenu", "(invalid)" }; ++eventType; if (eventType < 0) eventType = 0; if (eventType >= sizeof(events)/sizeof(events[0])) eventType = sizeof(events)/sizeof(events[0])-1; diff --git a/test/browser/test_html5_unknown_event_target.c b/test/browser/test_html5_unknown_event_target.c index f06b536e60ccf..20e2c7a516aac 100644 --- a/test/browser/test_html5_unknown_event_target.c +++ b/test/browser/test_html5_unknown_event_target.c @@ -32,6 +32,7 @@ int main(int argc, char **argv) { assert(emscripten_set_mouseleave_callback("this_dom_element_does_not_exist", 0, 0, mouse_cb) == EMSCRIPTEN_RESULT_UNKNOWN_TARGET); assert(emscripten_set_mouseover_callback("this_dom_element_does_not_exist", 0, 0, mouse_cb) == EMSCRIPTEN_RESULT_UNKNOWN_TARGET); assert(emscripten_set_mouseout_callback("this_dom_element_does_not_exist", 0, 0, mouse_cb) == EMSCRIPTEN_RESULT_UNKNOWN_TARGET); + assert(emscripten_set_contextmenu_callback("this_dom_element_does_not_exist", 0, 0, mouse_cb) == EMSCRIPTEN_RESULT_UNKNOWN_TARGET); assert(emscripten_set_wheel_callback("this_dom_element_does_not_exist", 0, 1, wheel_cb) == EMSCRIPTEN_RESULT_UNKNOWN_TARGET); diff --git a/test/codesize/test_codesize_hello_dylink_all.json b/test/codesize/test_codesize_hello_dylink_all.json index 380af5ac7a2db..0fc021bb6bdd1 100644 --- a/test/codesize/test_codesize_hello_dylink_all.json +++ b/test/codesize/test_codesize_hello_dylink_all.json @@ -894,6 +894,7 @@ "emscripten_set_main_loop_arg", "emscripten_set_main_loop_expected_blockers", "emscripten_set_main_loop_timing", + "emscripten_set_contextmenu_callback_on_thread", "emscripten_set_mousedown_callback_on_thread", "emscripten_set_mouseenter_callback_on_thread", "emscripten_set_mouseleave_callback_on_thread", diff --git a/test/test_keyboard_codes.c b/test/test_keyboard_codes.c index 058933f23fc39..035f8d0f0e8d3 100644 --- a/test/test_keyboard_codes.c +++ b/test/test_keyboard_codes.c @@ -15,7 +15,7 @@ static inline const char *emscripten_event_type_to_string(int eventType) { const char *events[] = { "(invalid)", "(none)", "keypress", "keydown", "keyup", "click", "mousedown", "mouseup", "dblclick", "mousemove", "wheel", "resize", "scroll", "blur", "focus", "focusin", "focusout", "deviceorientation", "devicemotion", "orientationchange", "fullscreenchange", "pointerlockchange", "visibilitychange", "touchstart", "touchend", "touchmove", "touchcancel", "gamepadconnected", "gamepaddisconnected", "beforeunload", - "batterychargingchange", "batterylevelchange", "webglcontextlost", "webglcontextrestored", "mouseenter", "mouseleave", "mouseover", "mouseout", "(invalid)" }; + "batterychargingchange", "batterylevelchange", "webglcontextlost", "webglcontextrestored", "mouseenter", "mouseleave", "mouseover", "mouseout", "canvasresized", "pointerlockerror", "contextmenu", "(invalid)" }; ++eventType; if (eventType < 0) eventType = 0; if (eventType >= sizeof(events)/sizeof(events[0])) eventType = sizeof(events)/sizeof(events[0])-1; From 911197839736a57a23b326d26d53f8ca54da15a7 Mon Sep 17 00:00:00 2001 From: stas-badzi Date: Thu, 25 Jun 2026 20:21:30 +0200 Subject: [PATCH 2/7] revert package-lock --- package-lock.json | 50 +++++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index 45d4b36f0750c..527fb524b79a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,7 +4,6 @@ "requires": true, "packages": { "": { - "name": "emscripten", "dependencies": { "acorn": "^8.16.0", "acorn-import-phases": "^1.0.4", @@ -1452,10 +1451,11 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", - "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1946,15 +1946,16 @@ } }, "node_modules/eslint/node_modules/brace-expansion": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", - "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.2.tgz", + "integrity": "sha512-Pdk8c9poy+YhOgVWw1JNN22/HcivgKWwpxKq04M/jTmHyCZn12WPJebZxdjSa5TmBqISrUSgNYU3eRORljfCCw==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^4.0.2" }, "engines": { - "node": "18 || 20 || >=22" + "node": "20 || >=22" } }, "node_modules/eslint/node_modules/eslint-visitor-keys": { @@ -2236,10 +2237,11 @@ } }, "node_modules/flatted": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", - "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", - "dev": true + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" }, "node_modules/fsevents": { "version": "2.3.3", @@ -2621,20 +2623,11 @@ } }, "node_modules/js-yaml": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", - "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/puzrin" - }, - { - "type": "github", - "url": "https://github.com/sponsors/nodeca" - } - ], + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -3245,10 +3238,11 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", - "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.6" }, From f2479f2d13562dfddba23615543221d9af025b74 Mon Sep 17 00:00:00 2001 From: stas-badzi Date: Thu, 25 Jun 2026 20:54:59 +0200 Subject: [PATCH 3/7] fix alphabetization of EMSCRIPTEN_EVENT_CONTEXTMENU --- src/struct_info_generated.json | 2 +- src/struct_info_generated_wasm64.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/struct_info_generated.json b/src/struct_info_generated.json index 4647884f9b592..f47d8d1c42eb2 100644 --- a/src/struct_info_generated.json +++ b/src/struct_info_generated.json @@ -132,6 +132,7 @@ "EMSCRIPTEN_EVENT_BLUR": 12, "EMSCRIPTEN_EVENT_CANVASRESIZED": 37, "EMSCRIPTEN_EVENT_CLICK": 4, + "EMSCRIPTEN_EVENT_CONTEXTMENU": 39, "EMSCRIPTEN_EVENT_DBLCLICK": 7, "EMSCRIPTEN_EVENT_DEVICEMOTION": 17, "EMSCRIPTEN_EVENT_DEVICEORIENTATION": 16, @@ -144,7 +145,6 @@ "EMSCRIPTEN_EVENT_KEYDOWN": 2, "EMSCRIPTEN_EVENT_KEYPRESS": 1, "EMSCRIPTEN_EVENT_KEYUP": 3, - "EMSCRIPTEN_EVENT_CONTEXTMENU": 39, "EMSCRIPTEN_EVENT_MOUSEDOWN": 5, "EMSCRIPTEN_EVENT_MOUSEENTER": 33, "EMSCRIPTEN_EVENT_MOUSELEAVE": 34, diff --git a/src/struct_info_generated_wasm64.json b/src/struct_info_generated_wasm64.json index d404fb01914c4..ef1e5229d8769 100644 --- a/src/struct_info_generated_wasm64.json +++ b/src/struct_info_generated_wasm64.json @@ -132,6 +132,7 @@ "EMSCRIPTEN_EVENT_BLUR": 12, "EMSCRIPTEN_EVENT_CANVASRESIZED": 37, "EMSCRIPTEN_EVENT_CLICK": 4, + "EMSCRIPTEN_EVENT_CONTEXTMENU": 39, "EMSCRIPTEN_EVENT_DBLCLICK": 7, "EMSCRIPTEN_EVENT_DEVICEMOTION": 17, "EMSCRIPTEN_EVENT_DEVICEORIENTATION": 16, @@ -144,7 +145,6 @@ "EMSCRIPTEN_EVENT_KEYDOWN": 2, "EMSCRIPTEN_EVENT_KEYPRESS": 1, "EMSCRIPTEN_EVENT_KEYUP": 3, - "EMSCRIPTEN_EVENT_CONTEXTMENU": 39, "EMSCRIPTEN_EVENT_MOUSEDOWN": 5, "EMSCRIPTEN_EVENT_MOUSEENTER": 33, "EMSCRIPTEN_EVENT_MOUSELEAVE": 34, From 74aafe966625cc1fef60bbff9ea2fd5379319b90 Mon Sep 17 00:00:00 2001 From: stas-badzi Date: Thu, 25 Jun 2026 21:11:05 +0200 Subject: [PATCH 4/7] add contextmenu entries and fix mouse event links in html5.h.rst --- site/source/docs/api_reference/html5.h.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/site/source/docs/api_reference/html5.h.rst b/site/source/docs/api_reference/html5.h.rst index 6d55bd1e5c681..f875097e7dba3 100644 --- a/site/source/docs/api_reference/html5.h.rst +++ b/site/source/docs/api_reference/html5.h.rst @@ -396,6 +396,7 @@ Defines EMSCRIPTEN_EVENT_MOUSEMOVE EMSCRIPTEN_EVENT_MOUSEENTER EMSCRIPTEN_EVENT_MOUSELEAVE + EMSCRIPTEN_EVENT_CONTEXTMENU Emscripten mouse events. @@ -405,7 +406,7 @@ Struct .. c:type:: EmscriptenMouseEvent - The event structure passed in `mouse events `_: `click `_, `mousedown `_, `mouseup `_, `dblclick `_, `mousemove `_, `mouseenter `_ and `mouseleave `_. + The event structure passed in `mouse events `_: `click `_, `mousedown `_, `mouseup `_, `dblclick `_, `mousemove `_, `mouseenter `_, `mouseleave `_ and `contextmenu `_. .. c:member:: double timestamp @@ -498,6 +499,7 @@ Functions EMSCRIPTEN_RESULT emscripten_set_mousemove_callback(const char *target, void *userData, bool useCapture, em_mouse_callback_func callback) EMSCRIPTEN_RESULT emscripten_set_mouseenter_callback(const char *target, void *userData, bool useCapture, em_mouse_callback_func callback) EMSCRIPTEN_RESULT emscripten_set_mouseleave_callback(const char *target, void *userData, bool useCapture, em_mouse_callback_func callback) + EMSCRIPTEN_RESULT emscripten_set_contextmenu_callback(const char *target, void *userData, bool useCapture, em_mouse_callback_func callback) Registers a callback function for receiving browser-generated `mouse input events `_. @@ -1369,7 +1371,7 @@ Functions Registers a callback function for receiving the `pointerlockchange `_ event. - Pointer lock hides the mouse cursor and exclusively gives the target element relative mouse movement events via the `mousemove `_ event. + Pointer lock hides the mouse cursor and exclusively gives the target element relative mouse movement events via the `mousemove `_ event. :param target: |target-parameter-doc| :type target: const char* From 41da7a14f647590f2cd2b619553ebb695546c3ec Mon Sep 17 00:00:00 2001 From: stas-badzi Date: Thu, 25 Jun 2026 21:19:57 +0200 Subject: [PATCH 5/7] fix libsigs alphabetization --- src/lib/libsigs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/libsigs.js b/src/lib/libsigs.js index a96d9a1a59b46..61b0b1b3929cc 100644 --- a/src/lib/libsigs.js +++ b/src/lib/libsigs.js @@ -761,6 +761,7 @@ sigs = { emscripten_set_canvas_element_size__sig: 'ipii', emscripten_set_canvas_size__sig: 'vii', emscripten_set_click_callback_on_thread__sig: 'ippipp', + emscripten_set_contextmenu_callback_on_thread__sig: 'ippipp', emscripten_set_dblclick_callback_on_thread__sig: 'ippipp', emscripten_set_devicemotion_callback_on_thread__sig: 'ipipp', emscripten_set_deviceorientation_callback_on_thread__sig: 'ipipp', @@ -788,7 +789,6 @@ sigs = { emscripten_set_mouseout_callback_on_thread__sig: 'ippipp', emscripten_set_mouseover_callback_on_thread__sig: 'ippipp', emscripten_set_mouseup_callback_on_thread__sig: 'ippipp', - emscripten_set_contextmenu_callback_on_thread__sig: 'ippipp', emscripten_set_orientationchange_callback_on_thread__sig: 'ipipp', emscripten_set_pointerlockchange_callback_on_thread__sig: 'ippipp', emscripten_set_pointerlockerror_callback_on_thread__sig: 'ippipp', From d1f339b8a0b8a36d0e660dd61370bf01bdef9325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Badziak?= <151390437+stas-badzi@users.noreply.github.com> Date: Fri, 26 Jun 2026 00:48:06 +0200 Subject: [PATCH 6/7] Try fix code size error --- test/codesize/test_codesize_hello_dylink_all.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/codesize/test_codesize_hello_dylink_all.json b/test/codesize/test_codesize_hello_dylink_all.json index 44097953a7783..a5bd13279d063 100644 --- a/test/codesize/test_codesize_hello_dylink_all.json +++ b/test/codesize/test_codesize_hello_dylink_all.json @@ -1,7 +1,7 @@ { - "a.out.js": 268495, - "a.out.nodebug.wasm": 587520, - "total": 856015, + "a.out.js": 268605, + "a.out.nodebug.wasm": 587605, + "total": 856210, "sent": [ "IMG_Init", "IMG_Load", From 00a6791ed8840b4898f9dbb4eecccf7fd740e890 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Fri, 26 Jun 2026 09:21:28 -0700 Subject: [PATCH 7/7] rebaseline --- test/codesize/test_codesize_cxx_ctors1.json | 8 ++++---- test/codesize/test_codesize_cxx_ctors2.json | 8 ++++---- test/codesize/test_codesize_cxx_except.json | 8 ++++---- test/codesize/test_codesize_cxx_except_wasm.json | 8 ++++---- .../test_codesize_cxx_except_wasm_legacy.json | 8 ++++---- test/codesize/test_codesize_cxx_lto.json | 8 ++++---- test/codesize/test_codesize_cxx_mangle.json | 8 ++++---- test/codesize/test_codesize_cxx_noexcept.json | 8 ++++---- test/codesize/test_codesize_cxx_wasmfs.json | 8 ++++---- .../test_codesize_file_preload.expected.js | 2 +- test/codesize/test_codesize_files_js_fs.json | 8 ++++---- test/codesize/test_codesize_files_wasmfs.json | 8 ++++---- test/codesize/test_codesize_hello_O0.json | 8 ++++---- test/codesize/test_codesize_hello_O1.json | 8 ++++---- test/codesize/test_codesize_hello_O2.json | 8 ++++---- test/codesize/test_codesize_hello_O3.json | 8 ++++---- test/codesize/test_codesize_hello_Os.json | 8 ++++---- test/codesize/test_codesize_hello_Oz.json | 8 ++++---- test/codesize/test_codesize_hello_dylink.json | 8 ++++---- .../codesize/test_codesize_hello_dylink_all.json | 8 ++++---- .../test_codesize_hello_export_nothing.json | 8 ++++---- .../test_codesize_hello_single_file.json | 4 ++-- test/codesize/test_codesize_hello_wasmfs.json | 8 ++++---- .../test_codesize_libcxxabi_message_O3.json | 8 ++++---- ...codesize_libcxxabi_message_O3_standalone.json | 8 ++++---- test/codesize/test_codesize_mem_O3.json | 8 ++++---- test/codesize/test_codesize_mem_O3_grow.json | 8 ++++---- .../test_codesize_mem_O3_grow_standalone.json | 8 ++++---- .../test_codesize_mem_O3_standalone.json | 8 ++++---- .../test_codesize_mem_O3_standalone_lib.json | 8 ++++---- .../test_codesize_mem_O3_standalone_narg.json | 8 ++++---- ...est_codesize_mem_O3_standalone_narg_flto.json | 8 ++++---- .../test_codesize_minimal_O0.expected.js | 4 +--- test/codesize/test_codesize_minimal_O0.json | 8 ++++---- test/codesize/test_small_js_flags.expected.js | 2 +- test/codesize/test_unoptimized_code_size.json | 16 ++++++++-------- 36 files changed, 137 insertions(+), 139 deletions(-) diff --git a/test/codesize/test_codesize_cxx_ctors1.json b/test/codesize/test_codesize_cxx_ctors1.json index 6718afc21a87b..f3a039cf515c2 100644 --- a/test/codesize/test_codesize_cxx_ctors1.json +++ b/test/codesize/test_codesize_cxx_ctors1.json @@ -1,10 +1,10 @@ { - "a.out.js": 19218, - "a.out.js.gz": 7948, + "a.out.js": 19210, + "a.out.js.gz": 7946, "a.out.nodebug.wasm": 132603, "a.out.nodebug.wasm.gz": 49939, - "total": 151821, - "total_gz": 57887, + "total": 151813, + "total_gz": 57885, "sent": [ "__cxa_throw", "_abort_js", diff --git a/test/codesize/test_codesize_cxx_ctors2.json b/test/codesize/test_codesize_cxx_ctors2.json index 82c44ef768697..0ee85493d2324 100644 --- a/test/codesize/test_codesize_cxx_ctors2.json +++ b/test/codesize/test_codesize_cxx_ctors2.json @@ -1,10 +1,10 @@ { - "a.out.js": 19195, - "a.out.js.gz": 7932, + "a.out.js": 19187, + "a.out.js.gz": 7930, "a.out.nodebug.wasm": 132029, "a.out.nodebug.wasm.gz": 49599, - "total": 151224, - "total_gz": 57531, + "total": 151216, + "total_gz": 57529, "sent": [ "__cxa_throw", "_abort_js", diff --git a/test/codesize/test_codesize_cxx_except.json b/test/codesize/test_codesize_cxx_except.json index dcd3f89776e5d..f53b0df606a55 100644 --- a/test/codesize/test_codesize_cxx_except.json +++ b/test/codesize/test_codesize_cxx_except.json @@ -1,10 +1,10 @@ { - "a.out.js": 23191, - "a.out.js.gz": 8939, + "a.out.js": 23183, + "a.out.js.gz": 8935, "a.out.nodebug.wasm": 172523, "a.out.nodebug.wasm.gz": 57480, - "total": 195714, - "total_gz": 66419, + "total": 195706, + "total_gz": 66415, "sent": [ "__cxa_begin_catch", "__cxa_end_catch", diff --git a/test/codesize/test_codesize_cxx_except_wasm.json b/test/codesize/test_codesize_cxx_except_wasm.json index c019832235b17..0f9902538e4cd 100644 --- a/test/codesize/test_codesize_cxx_except_wasm.json +++ b/test/codesize/test_codesize_cxx_except_wasm.json @@ -1,10 +1,10 @@ { - "a.out.js": 19017, - "a.out.js.gz": 7872, + "a.out.js": 19009, + "a.out.js.gz": 7870, "a.out.nodebug.wasm": 147928, "a.out.nodebug.wasm.gz": 55349, - "total": 166945, - "total_gz": 63221, + "total": 166937, + "total_gz": 63219, "sent": [ "_abort_js", "_tzset_js", diff --git a/test/codesize/test_codesize_cxx_except_wasm_legacy.json b/test/codesize/test_codesize_cxx_except_wasm_legacy.json index 0bb9877f1c173..1f9ecab453bab 100644 --- a/test/codesize/test_codesize_cxx_except_wasm_legacy.json +++ b/test/codesize/test_codesize_cxx_except_wasm_legacy.json @@ -1,10 +1,10 @@ { - "a.out.js": 19095, - "a.out.js.gz": 7894, + "a.out.js": 19087, + "a.out.js.gz": 7893, "a.out.nodebug.wasm": 145734, "a.out.nodebug.wasm.gz": 54976, - "total": 164829, - "total_gz": 62870, + "total": 164821, + "total_gz": 62869, "sent": [ "_abort_js", "_tzset_js", diff --git a/test/codesize/test_codesize_cxx_lto.json b/test/codesize/test_codesize_cxx_lto.json index 51130185b136a..18e3b8bb90134 100644 --- a/test/codesize/test_codesize_cxx_lto.json +++ b/test/codesize/test_codesize_cxx_lto.json @@ -1,10 +1,10 @@ { - "a.out.js": 18557, - "a.out.js.gz": 7638, + "a.out.js": 18549, + "a.out.js.gz": 7639, "a.out.nodebug.wasm": 102090, "a.out.nodebug.wasm.gz": 39548, - "total": 120647, - "total_gz": 47186, + "total": 120639, + "total_gz": 47187, "sent": [ "a (emscripten_resize_heap)", "b (_setitimer_js)", diff --git a/test/codesize/test_codesize_cxx_mangle.json b/test/codesize/test_codesize_cxx_mangle.json index 6efa72d7d0708..57a05c12447d1 100644 --- a/test/codesize/test_codesize_cxx_mangle.json +++ b/test/codesize/test_codesize_cxx_mangle.json @@ -1,10 +1,10 @@ { - "a.out.js": 23241, - "a.out.js.gz": 8961, + "a.out.js": 23233, + "a.out.js.gz": 8957, "a.out.nodebug.wasm": 238952, "a.out.nodebug.wasm.gz": 79833, - "total": 262193, - "total_gz": 88794, + "total": 262185, + "total_gz": 88790, "sent": [ "__cxa_begin_catch", "__cxa_end_catch", diff --git a/test/codesize/test_codesize_cxx_noexcept.json b/test/codesize/test_codesize_cxx_noexcept.json index 0ddb5438c4989..1f76d6ab30d77 100644 --- a/test/codesize/test_codesize_cxx_noexcept.json +++ b/test/codesize/test_codesize_cxx_noexcept.json @@ -1,10 +1,10 @@ { - "a.out.js": 19218, - "a.out.js.gz": 7948, + "a.out.js": 19210, + "a.out.js.gz": 7946, "a.out.nodebug.wasm": 134603, "a.out.nodebug.wasm.gz": 50779, - "total": 153821, - "total_gz": 58727, + "total": 153813, + "total_gz": 58725, "sent": [ "__cxa_throw", "_abort_js", diff --git a/test/codesize/test_codesize_cxx_wasmfs.json b/test/codesize/test_codesize_cxx_wasmfs.json index 28ad5714bcbfd..481930b4636a4 100644 --- a/test/codesize/test_codesize_cxx_wasmfs.json +++ b/test/codesize/test_codesize_cxx_wasmfs.json @@ -1,10 +1,10 @@ { - "a.out.js": 6938, - "a.out.js.gz": 3259, + "a.out.js": 6930, + "a.out.js.gz": 3255, "a.out.nodebug.wasm": 172740, "a.out.nodebug.wasm.gz": 63346, - "total": 179678, - "total_gz": 66605, + "total": 179670, + "total_gz": 66601, "sent": [ "__cxa_throw", "_abort_js", diff --git a/test/codesize/test_codesize_file_preload.expected.js b/test/codesize/test_codesize_file_preload.expected.js index 9edbcaffdedf2..97b40bb0640ea 100644 --- a/test/codesize/test_codesize_file_preload.expected.js +++ b/test/codesize/test_codesize_file_preload.expected.js @@ -456,7 +456,7 @@ async function createWasm() { // Load the wasm module and create an instance of using native support in the JS engine. // handle a generated wasm instance, receiving its exports and // performing other necessary setup - /** @param {WebAssembly.Module=} module*/ function receiveInstance(instance, module) { + function receiveInstance(instance) { wasmExports = instance.exports; assignWasmExports(wasmExports); updateMemoryViews(); diff --git a/test/codesize/test_codesize_files_js_fs.json b/test/codesize/test_codesize_files_js_fs.json index 77e701bb2f691..e43b57d7f8967 100644 --- a/test/codesize/test_codesize_files_js_fs.json +++ b/test/codesize/test_codesize_files_js_fs.json @@ -1,10 +1,10 @@ { - "a.out.js": 17866, - "a.out.js.gz": 7289, + "a.out.js": 17858, + "a.out.js.gz": 7287, "a.out.nodebug.wasm": 381, "a.out.nodebug.wasm.gz": 258, - "total": 18247, - "total_gz": 7547, + "total": 18239, + "total_gz": 7545, "sent": [ "a (fd_write)", "b (fd_read)", diff --git a/test/codesize/test_codesize_files_wasmfs.json b/test/codesize/test_codesize_files_wasmfs.json index 0c1d67bd6dd6b..0ce5a5b2191f2 100644 --- a/test/codesize/test_codesize_files_wasmfs.json +++ b/test/codesize/test_codesize_files_wasmfs.json @@ -1,10 +1,10 @@ { - "a.out.js": 5372, - "a.out.js.gz": 2527, + "a.out.js": 5363, + "a.out.js.gz": 2523, "a.out.nodebug.wasm": 58520, "a.out.nodebug.wasm.gz": 18224, - "total": 63892, - "total_gz": 20751, + "total": 63883, + "total_gz": 20747, "sent": [ "a (emscripten_date_now)", "b (emscripten_err)", diff --git a/test/codesize/test_codesize_hello_O0.json b/test/codesize/test_codesize_hello_O0.json index 35c3470b5e2e5..3240c949f4685 100644 --- a/test/codesize/test_codesize_hello_O0.json +++ b/test/codesize/test_codesize_hello_O0.json @@ -1,10 +1,10 @@ { - "a.out.js": 23483, - "a.out.js.gz": 8523, + "a.out.js": 23452, + "a.out.js.gz": 8516, "a.out.nodebug.wasm": 15115, "a.out.nodebug.wasm.gz": 7464, - "total": 38598, - "total_gz": 15987, + "total": 38567, + "total_gz": 15980, "sent": [ "fd_write" ], diff --git a/test/codesize/test_codesize_hello_O1.json b/test/codesize/test_codesize_hello_O1.json index 6fc1e13f37b50..d7d21b049b2cb 100644 --- a/test/codesize/test_codesize_hello_O1.json +++ b/test/codesize/test_codesize_hello_O1.json @@ -1,10 +1,10 @@ { - "a.out.js": 6081, - "a.out.js.gz": 2373, + "a.out.js": 6054, + "a.out.js.gz": 2369, "a.out.nodebug.wasm": 2544, "a.out.nodebug.wasm.gz": 1436, - "total": 8625, - "total_gz": 3809, + "total": 8598, + "total_gz": 3805, "sent": [ "fd_write" ], diff --git a/test/codesize/test_codesize_hello_O2.json b/test/codesize/test_codesize_hello_O2.json index 0faee4aae5e9f..4c947877d5dbf 100644 --- a/test/codesize/test_codesize_hello_O2.json +++ b/test/codesize/test_codesize_hello_O2.json @@ -1,10 +1,10 @@ { - "a.out.js": 4224, - "a.out.js.gz": 2073, + "a.out.js": 4216, + "a.out.js.gz": 2068, "a.out.nodebug.wasm": 1912, "a.out.nodebug.wasm.gz": 1129, - "total": 6136, - "total_gz": 3202, + "total": 6128, + "total_gz": 3197, "sent": [ "fd_write" ], diff --git a/test/codesize/test_codesize_hello_O3.json b/test/codesize/test_codesize_hello_O3.json index 64fa4e9f093c2..8492ed1ca4ece 100644 --- a/test/codesize/test_codesize_hello_O3.json +++ b/test/codesize/test_codesize_hello_O3.json @@ -1,10 +1,10 @@ { - "a.out.js": 4166, - "a.out.js.gz": 2034, + "a.out.js": 4157, + "a.out.js.gz": 2027, "a.out.nodebug.wasm": 1666, "a.out.nodebug.wasm.gz": 945, - "total": 5832, - "total_gz": 2979, + "total": 5823, + "total_gz": 2972, "sent": [ "a (fd_write)" ], diff --git a/test/codesize/test_codesize_hello_Os.json b/test/codesize/test_codesize_hello_Os.json index 08188848925a5..764a1f007fd48 100644 --- a/test/codesize/test_codesize_hello_Os.json +++ b/test/codesize/test_codesize_hello_Os.json @@ -1,10 +1,10 @@ { - "a.out.js": 4166, - "a.out.js.gz": 2034, + "a.out.js": 4157, + "a.out.js.gz": 2027, "a.out.nodebug.wasm": 1654, "a.out.nodebug.wasm.gz": 953, - "total": 5820, - "total_gz": 2987, + "total": 5811, + "total_gz": 2980, "sent": [ "a (fd_write)" ], diff --git a/test/codesize/test_codesize_hello_Oz.json b/test/codesize/test_codesize_hello_Oz.json index 0e864c65a4e75..5666c1e87700f 100644 --- a/test/codesize/test_codesize_hello_Oz.json +++ b/test/codesize/test_codesize_hello_Oz.json @@ -1,10 +1,10 @@ { - "a.out.js": 3801, - "a.out.js.gz": 1840, + "a.out.js": 3792, + "a.out.js.gz": 1837, "a.out.nodebug.wasm": 1188, "a.out.nodebug.wasm.gz": 731, - "total": 4989, - "total_gz": 2571, + "total": 4980, + "total_gz": 2568, "sent": [ "a (fd_write)" ], diff --git a/test/codesize/test_codesize_hello_dylink.json b/test/codesize/test_codesize_hello_dylink.json index 92ca5300b3a59..b795be89dbda9 100644 --- a/test/codesize/test_codesize_hello_dylink.json +++ b/test/codesize/test_codesize_hello_dylink.json @@ -1,10 +1,10 @@ { - "a.out.js": 26271, - "a.out.js.gz": 11190, + "a.out.js": 26269, + "a.out.js.gz": 11189, "a.out.nodebug.wasm": 17861, "a.out.nodebug.wasm.gz": 9019, - "total": 44132, - "total_gz": 20209, + "total": 44130, + "total_gz": 20208, "sent": [ "__syscall_stat64", "emscripten_resize_heap", diff --git a/test/codesize/test_codesize_hello_dylink_all.json b/test/codesize/test_codesize_hello_dylink_all.json index a5bd13279d063..66fb03a18b89c 100644 --- a/test/codesize/test_codesize_hello_dylink_all.json +++ b/test/codesize/test_codesize_hello_dylink_all.json @@ -1,7 +1,7 @@ { - "a.out.js": 268605, - "a.out.nodebug.wasm": 587605, - "total": 856210, + "a.out.js": 268603, + "a.out.nodebug.wasm": 587520, + "total": 856123, "sent": [ "IMG_Init", "IMG_Load", @@ -876,6 +876,7 @@ "emscripten_set_canvas_element_size", "emscripten_set_canvas_size", "emscripten_set_click_callback_on_thread", + "emscripten_set_contextmenu_callback_on_thread", "emscripten_set_dblclick_callback_on_thread", "emscripten_set_devicemotion_callback_on_thread", "emscripten_set_deviceorientation_callback_on_thread", @@ -896,7 +897,6 @@ "emscripten_set_main_loop_arg", "emscripten_set_main_loop_expected_blockers", "emscripten_set_main_loop_timing", - "emscripten_set_contextmenu_callback_on_thread", "emscripten_set_mousedown_callback_on_thread", "emscripten_set_mouseenter_callback_on_thread", "emscripten_set_mouseleave_callback_on_thread", diff --git a/test/codesize/test_codesize_hello_export_nothing.json b/test/codesize/test_codesize_hello_export_nothing.json index 37e4d982df25e..fb754d1445761 100644 --- a/test/codesize/test_codesize_hello_export_nothing.json +++ b/test/codesize/test_codesize_hello_export_nothing.json @@ -1,10 +1,10 @@ { - "a.out.js": 3059, - "a.out.js.gz": 1422, + "a.out.js": 3051, + "a.out.js.gz": 1418, "a.out.nodebug.wasm": 43, "a.out.nodebug.wasm.gz": 59, - "total": 3102, - "total_gz": 1481, + "total": 3094, + "total_gz": 1477, "sent": [], "imports": [], "exports": [ diff --git a/test/codesize/test_codesize_hello_single_file.json b/test/codesize/test_codesize_hello_single_file.json index 0e0d8db9e4571..ba636567b0f8d 100644 --- a/test/codesize/test_codesize_hello_single_file.json +++ b/test/codesize/test_codesize_hello_single_file.json @@ -1,6 +1,6 @@ { - "a.out.js": 5141, - "a.out.js.gz": 2827, + "a.out.js": 5133, + "a.out.js.gz": 2824, "sent": [ "a (fd_write)" ] diff --git a/test/codesize/test_codesize_hello_wasmfs.json b/test/codesize/test_codesize_hello_wasmfs.json index 64fa4e9f093c2..8492ed1ca4ece 100644 --- a/test/codesize/test_codesize_hello_wasmfs.json +++ b/test/codesize/test_codesize_hello_wasmfs.json @@ -1,10 +1,10 @@ { - "a.out.js": 4166, - "a.out.js.gz": 2034, + "a.out.js": 4157, + "a.out.js.gz": 2027, "a.out.nodebug.wasm": 1666, "a.out.nodebug.wasm.gz": 945, - "total": 5832, - "total_gz": 2979, + "total": 5823, + "total_gz": 2972, "sent": [ "a (fd_write)" ], diff --git a/test/codesize/test_codesize_libcxxabi_message_O3.json b/test/codesize/test_codesize_libcxxabi_message_O3.json index 488aa8875ea60..4cfa8aa30495a 100644 --- a/test/codesize/test_codesize_libcxxabi_message_O3.json +++ b/test/codesize/test_codesize_libcxxabi_message_O3.json @@ -1,10 +1,10 @@ { - "a.out.js": 3428, - "a.out.js.gz": 1608, + "a.out.js": 3419, + "a.out.js.gz": 1603, "a.out.nodebug.wasm": 89, "a.out.nodebug.wasm.gz": 98, - "total": 3517, - "total_gz": 1706, + "total": 3508, + "total_gz": 1701, "sent": [], "imports": [], "exports": [ diff --git a/test/codesize/test_codesize_libcxxabi_message_O3_standalone.json b/test/codesize/test_codesize_libcxxabi_message_O3_standalone.json index a85247b0c82d5..8cbdcbb7e7781 100644 --- a/test/codesize/test_codesize_libcxxabi_message_O3_standalone.json +++ b/test/codesize/test_codesize_libcxxabi_message_O3_standalone.json @@ -1,10 +1,10 @@ { - "a.out.js": 3475, - "a.out.js.gz": 1644, + "a.out.js": 3467, + "a.out.js.gz": 1641, "a.out.nodebug.wasm": 222, "a.out.nodebug.wasm.gz": 206, - "total": 3697, - "total_gz": 1850, + "total": 3689, + "total_gz": 1847, "sent": [ "proc_exit" ], diff --git a/test/codesize/test_codesize_mem_O3.json b/test/codesize/test_codesize_mem_O3.json index 651a91502de6c..35ff85ba0285d 100644 --- a/test/codesize/test_codesize_mem_O3.json +++ b/test/codesize/test_codesize_mem_O3.json @@ -1,10 +1,10 @@ { - "a.out.js": 4241, - "a.out.js.gz": 2031, + "a.out.js": 4233, + "a.out.js.gz": 2026, "a.out.nodebug.wasm": 5260, "a.out.nodebug.wasm.gz": 2419, - "total": 9501, - "total_gz": 4450, + "total": 9493, + "total_gz": 4445, "sent": [ "a (emscripten_resize_heap)" ], diff --git a/test/codesize/test_codesize_mem_O3_grow.json b/test/codesize/test_codesize_mem_O3_grow.json index 3e74d065b3e74..455153419ed3b 100644 --- a/test/codesize/test_codesize_mem_O3_grow.json +++ b/test/codesize/test_codesize_mem_O3_grow.json @@ -1,10 +1,10 @@ { - "a.out.js": 4551, - "a.out.js.gz": 2197, + "a.out.js": 4543, + "a.out.js.gz": 2193, "a.out.nodebug.wasm": 5261, "a.out.nodebug.wasm.gz": 2419, - "total": 9812, - "total_gz": 4616, + "total": 9804, + "total_gz": 4612, "sent": [ "a (emscripten_resize_heap)" ], diff --git a/test/codesize/test_codesize_mem_O3_grow_standalone.json b/test/codesize/test_codesize_mem_O3_grow_standalone.json index 3cd6ed62252d6..c7a83ed786185 100644 --- a/test/codesize/test_codesize_mem_O3_grow_standalone.json +++ b/test/codesize/test_codesize_mem_O3_grow_standalone.json @@ -1,10 +1,10 @@ { - "a.out.js": 4014, - "a.out.js.gz": 1935, + "a.out.js": 4006, + "a.out.js.gz": 1931, "a.out.nodebug.wasm": 5641, "a.out.nodebug.wasm.gz": 2659, - "total": 9655, - "total_gz": 4594, + "total": 9647, + "total_gz": 4590, "sent": [ "args_get", "args_sizes_get", diff --git a/test/codesize/test_codesize_mem_O3_standalone.json b/test/codesize/test_codesize_mem_O3_standalone.json index 41ea30643af6c..8930b8070486e 100644 --- a/test/codesize/test_codesize_mem_O3_standalone.json +++ b/test/codesize/test_codesize_mem_O3_standalone.json @@ -1,10 +1,10 @@ { - "a.out.js": 3928, - "a.out.js.gz": 1890, + "a.out.js": 3920, + "a.out.js.gz": 1887, "a.out.nodebug.wasm": 5565, "a.out.nodebug.wasm.gz": 2598, - "total": 9493, - "total_gz": 4488, + "total": 9485, + "total_gz": 4485, "sent": [ "args_get", "args_sizes_get", diff --git a/test/codesize/test_codesize_mem_O3_standalone_lib.json b/test/codesize/test_codesize_mem_O3_standalone_lib.json index 8cfbd2cf6a1a0..9451e40112eca 100644 --- a/test/codesize/test_codesize_mem_O3_standalone_lib.json +++ b/test/codesize/test_codesize_mem_O3_standalone_lib.json @@ -1,10 +1,10 @@ { - "a.out.js": 3468, - "a.out.js.gz": 1635, + "a.out.js": 3460, + "a.out.js.gz": 1632, "a.out.nodebug.wasm": 5239, "a.out.nodebug.wasm.gz": 2359, - "total": 8707, - "total_gz": 3994, + "total": 8699, + "total_gz": 3991, "sent": [], "imports": [], "exports": [ diff --git a/test/codesize/test_codesize_mem_O3_standalone_narg.json b/test/codesize/test_codesize_mem_O3_standalone_narg.json index 6189af6c29091..a556538bfc635 100644 --- a/test/codesize/test_codesize_mem_O3_standalone_narg.json +++ b/test/codesize/test_codesize_mem_O3_standalone_narg.json @@ -1,10 +1,10 @@ { - "a.out.js": 3475, - "a.out.js.gz": 1644, + "a.out.js": 3467, + "a.out.js.gz": 1641, "a.out.nodebug.wasm": 5354, "a.out.nodebug.wasm.gz": 2442, - "total": 8829, - "total_gz": 4086, + "total": 8821, + "total_gz": 4083, "sent": [ "proc_exit" ], diff --git a/test/codesize/test_codesize_mem_O3_standalone_narg_flto.json b/test/codesize/test_codesize_mem_O3_standalone_narg_flto.json index e654914a333d4..a131dbc11c47b 100644 --- a/test/codesize/test_codesize_mem_O3_standalone_narg_flto.json +++ b/test/codesize/test_codesize_mem_O3_standalone_narg_flto.json @@ -1,10 +1,10 @@ { - "a.out.js": 3475, - "a.out.js.gz": 1644, + "a.out.js": 3467, + "a.out.js.gz": 1641, "a.out.nodebug.wasm": 4285, "a.out.nodebug.wasm.gz": 2142, - "total": 7760, - "total_gz": 3786, + "total": 7752, + "total_gz": 3783, "sent": [ "proc_exit" ], diff --git a/test/codesize/test_codesize_minimal_O0.expected.js b/test/codesize/test_codesize_minimal_O0.expected.js index b97d7b35a7ad0..e9db6e95947d5 100644 --- a/test/codesize/test_codesize_minimal_O0.expected.js +++ b/test/codesize/test_codesize_minimal_O0.expected.js @@ -677,8 +677,7 @@ async function createWasm() { // Load the wasm module and create an instance of using native support in the JS engine. // handle a generated wasm instance, receiving its exports and // performing other necessary setup - /** @param {WebAssembly.Module=} module*/ - function receiveInstance(instance, module) { + function receiveInstance(instance) { wasmExports = instance.exports; assignWasmExports(wasmExports); @@ -1226,7 +1225,6 @@ function checkIncomingModuleAPI() { ignoredModuleProp('INITIAL_MEMORY'); ignoredModuleProp('wasmMemory'); ignoredModuleProp('arguments'); - ignoredModuleProp('buffer'); ignoredModuleProp('canvas'); ignoredModuleProp('doNotCaptureKeyboard'); ignoredModuleProp('dynamicLibraries'); diff --git a/test/codesize/test_codesize_minimal_O0.json b/test/codesize/test_codesize_minimal_O0.json index 325e0d534493a..3657e961abb5b 100644 --- a/test/codesize/test_codesize_minimal_O0.json +++ b/test/codesize/test_codesize_minimal_O0.json @@ -1,10 +1,10 @@ { - "a.out.js": 18723, - "a.out.js.gz": 6778, + "a.out.js": 18710, + "a.out.js.gz": 6773, "a.out.nodebug.wasm": 1015, "a.out.nodebug.wasm.gz": 602, - "total": 19738, - "total_gz": 7380, + "total": 19725, + "total_gz": 7375, "sent": [], "imports": [], "exports": [ diff --git a/test/codesize/test_small_js_flags.expected.js b/test/codesize/test_small_js_flags.expected.js index 798ff6cc0266a..f266141fc68be 100644 --- a/test/codesize/test_small_js_flags.expected.js +++ b/test/codesize/test_small_js_flags.expected.js @@ -233,7 +233,7 @@ async function createWasm() { // Load the wasm module and create an instance of using native support in the JS engine. // handle a generated wasm instance, receiving its exports and // performing other necessary setup - /** @param {WebAssembly.Module=} module*/ function receiveInstance(instance, module) { + function receiveInstance(instance) { wasmExports = instance.exports; assignWasmExports(wasmExports); updateMemoryViews(); diff --git a/test/codesize/test_unoptimized_code_size.json b/test/codesize/test_unoptimized_code_size.json index 3e8dbb92eef88..7114c8e4b0ed8 100644 --- a/test/codesize/test_unoptimized_code_size.json +++ b/test/codesize/test_unoptimized_code_size.json @@ -1,16 +1,16 @@ { - "hello_world.js": 55305, - "hello_world.js.gz": 17405, + "hello_world.js": 55220, + "hello_world.js.gz": 17384, "hello_world.wasm": 15115, "hello_world.wasm.gz": 7464, - "no_asserts.js": 25683, - "no_asserts.js.gz": 8690, + "no_asserts.js": 25598, + "no_asserts.js.gz": 8668, "no_asserts.wasm": 12229, "no_asserts.wasm.gz": 6004, - "strict.js": 53033, - "strict.js.gz": 16620, + "strict.js": 52950, + "strict.js.gz": 16590, "strict.wasm": 15115, "strict.wasm.gz": 7461, - "total": 176480, - "total_gz": 63644 + "total": 176227, + "total_gz": 63571 }