Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IndexedDb in a Web Worker in the latest Safari?

I have an existing app which runs on fine in earlier versions of Safari and makes use of an indexedDB polyfill to store data. Most of this activity takes place in a web worker so WebSQL can be accessed from the web worker.

However, I am now trying native indexedDB access using Safari 6.2 and although indexedDB can be referenced in the "main" work thread, when i try to access "self.indexeddb" or "indexeddb" they both come back as undefined.

Has anyone been able to access indexedDB in a web worker in the newest versions of Safari?

like image 846
Jonathan Smith Avatar asked Nov 11 '22 02:11

Jonathan Smith


1 Answers

Has anyone been able to access indexedDB in a web worker in the newest versions of Safari?

IndexedDB is accessible from Web Worker since Safari Technology Preview Release 5:

Safari Technology Preview is a version of Safari for OS X, distributed by Apple, that includes a cutting-edge, in-development version of the WebKit browser engine. It’s a great way to test upcoming WebKit features and give feedback to the people building them when it’s most useful — early in development.

Released on May 15, 2016. The release notes state:

Enabled IndexedDB in Web Worker scripts

Safari Technology Preview requires a Mac running OS X 10.11.4 or later. Release 5 of Safari Technology Preview covers WebKit revisions 200418–201083.

References

  • Introducing Safari Technology Preview

  • Safari Technology Preview: Release Notes

  • Release Notes for Safari Technology Preview 5

  • Webkit Bug 149953 – Modern IDB: WebWorker support

  • What's New in MacOS

  • Primary Key issue on iOS8 implementation of IndexedDb

  • indexeddb on iOS 8 - Broken Bad

like image 116
Paul Sweatte Avatar answered Dec 10 '22 00:12

Paul Sweatte