summaryrefslogtreecommitdiff
path: root/helpers.js
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2024-03-03 00:10:10 -0500
committerLLLL Colonq <llll@colonq>2024-03-03 00:10:10 -0500
commit070108cf09b1b561613b6eea04723afbbb464507 (patch)
tree01503df63f16ef6ef4ab4a37b24305286bb2477c /helpers.js
Initial commit (new winit)
Diffstat (limited to 'helpers.js')
-rw-r--r--helpers.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/helpers.js b/helpers.js
new file mode 100644
index 0000000..20b86f4
--- /dev/null
+++ b/helpers.js
@@ -0,0 +1,13 @@
+let resized = false;
+
+export async function js_track_resized_setup() {
+ window.addEventListener("resize", () => {
+ resized = true;
+ });
+};
+
+export function js_poll_resized() {
+ let ret = resized;
+ resized = false;
+ return ret;
+}