pouchdb-community / worker-pouch

Easy way to use PouchDB inside a Web Worker or Service Worker
Apache License 2.0
218 stars 34 forks source link

Would this work in a WebExtension? #32

Open BigBlueHat opened 7 years ago

BigBlueHat commented 7 years ago

@glynnbird and I are curious. 😉

nolanlawson commented 7 years ago

I am not sure if web extensions support web workers. I believe they don't actually.

nolanlawson commented 7 years ago

But on the bright side I'm pretty sure they get their own JS realm and separate thread/process so workers aren't necessary

BigBlueHat commented 7 years ago

@nolanlawson ah. Good to know. I'm pondering putting PouchDB in a sandbox'ed page and then communicating with that via the Web Extension postMessage stuff. That should work (and allow for eval()'ing Map/Reduce), but I'm not (yet) certain at what cost. Pondering.

Thanks for the reply!