patch js in a better way, fix event loop logic

This commit is contained in:
ading2210 2024-01-17 01:04:43 -05:00
parent 4af7f6a4a0
commit fc32c7c1fb
8 changed files with 57 additions and 21 deletions

View file

@ -0,0 +1,5 @@
/* INSERT
var ?opts ?= ?undefined;
*/
var parts=addr.split("/");
url = url + parts[0] + ":" + port;

View file

@ -0,0 +1,9 @@
/* DELETE
err\("__syscall_getsockname " ?\+ ?fd\);
*/
/* INSERT
function _emscripten_console_error\(str\) {
*/
if (UTF8ToString(str).endsWith("__syscall_setsockopt\\n")) return;

View file

@ -0,0 +1,4 @@
/* REPLACE
new WebSocketConstructor
*/
new WispWebSocket