diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-10-05 12:54:42 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-10-05 14:15:07 +0200 |
commit | 7d6c1fdb32d277d1986be60e34b92dbca4e30939 (patch) | |
tree | d2061822724dd8d69efe919eebf818136b1b815e /platform/javascript/js | |
parent | b6315afc9ae89d12bcb6201b627605d630d58e58 (diff) |
[HTML5] Implement window blur in JS library.
Removes more emscripten HTML5 library dependencies.
Diffstat (limited to 'platform/javascript/js')
-rw-r--r-- | platform/javascript/js/libs/library_godot_display.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/javascript/js/libs/library_godot_display.js b/platform/javascript/js/libs/library_godot_display.js index 435e5d89c8..a254c92d4d 100644 --- a/platform/javascript/js/libs/library_godot_display.js +++ b/platform/javascript/js/libs/library_godot_display.js @@ -867,6 +867,14 @@ const GodotDisplay = { GodotDisplayListeners.add(document, 'webkitfullscreenchange', change_cb, false); }, + godot_js_display_window_blur_cb__sig: 'vi', + godot_js_display_window_blur_cb: function (callback) { + const func = GodotRuntime.get_func(callback); + GodotDisplayListeners.add(window, 'blur', function () { + func(); + }, false); + }, + godot_js_display_notification_cb__sig: 'viiiii', godot_js_display_notification_cb: function (callback, p_enter, p_exit, p_in, p_out) { const canvas = GodotConfig.canvas; |