dexie / Dexie.js

A Minimalistic Wrapper for IndexedDB
https://dexie.org
Apache License 2.0
11.56k stars 642 forks source link

Backwards compatibility issue - ReferenceError: queueMicrotask is not defined #1999

Open risharde opened 4 months ago

risharde commented 4 months ago

Hi, so I'm testing Dexie on mobile development and I get this error when I'm testing on Android 9. After some research, it seems that the web browser doesn't have a queueMicrotask function (likely due to the age) But it seems like Dexie is going to be a problem if we don't consider keeping functionality backward compatible at least in regards to mobile (which I think Dexie shines alot for) I wish I knew enough to fix this but I don't at the moment Can anyone shed light on how possible it would be to add some backwards compatibility for queueMicrotask?

dfahlander commented 4 months ago

dexie@3.x is still maintained in terms of security fixes and other possibly critical things but no active development. But it supports legacy devices (Android 9 is from 2018). I don't know if it would be worth it to add support for this in particular on dexie@4 but there is a polyfil in case you would want to give it a try:

https://polyfill.io/v3/polyfill.min.js?features=queueMicrotask

dfahlander commented 4 months ago

Or this one maybe: https://github.com/feross/queue-microtask