1
0
Fork 0

[mujs] global function alert, setTimeout, etc.

This commit is contained in:
Witold Filipczyk 2022-08-21 19:21:04 +02:00
parent f0d5b3ad9c
commit 7f44731365
1 changed files with 6 additions and 0 deletions

View File

@ -407,5 +407,11 @@ mjs_window_init(js_State *J)
}
js_defglobal(J, "window", JS_DONTENUM);
js_dostring(J, "function alert(text) { return window.alert(text); }\n"
"function clearTimeout(h) { return window.clearTimeout(h); }\n"
"function open(a, b, c) { return window.open(a, b, c); }\n"
"function setTimeout(a, b) { return window.setTimeout(a, b); }\n"
"function toString() { return window.toString(); }\n");
return 0;
}