about summary refs log tree commit diff
path: root/src/platform/polyfills.web.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-02-23 16:42:52 -0600
committerPaul Frazee <pfrazee@gmail.com>2023-02-23 16:42:52 -0600
commitb4f2a6979afeeb6b0b29bbf668d61b23b65b47ec (patch)
treea73e44e25ff163b5668b64369fe1e3af11ac0b7f /src/platform/polyfills.web.ts
parent4182edfd7e3333fcf31b94f2f091fe143945b809 (diff)
downloadvoidsky-b4f2a6979afeeb6b0b29bbf668d61b23b65b47ec.tar.zst
Add setImmediate polyfill to web, fixing dropdown items
Diffstat (limited to 'src/platform/polyfills.web.ts')
-rw-r--r--src/platform/polyfills.web.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/platform/polyfills.web.ts b/src/platform/polyfills.web.ts
new file mode 100644
index 000000000..7a42f4887
--- /dev/null
+++ b/src/platform/polyfills.web.ts
@@ -0,0 +1,4 @@
+/// <reference lib="dom" />
+
+// @ts-ignore whatever typescript wants to complain about here, I dont care about -prf
+window.setImmediate = (cb: () => void) => setTimeout(cb, 0)