ujjwalguptaofficial / JsStore

Simplifying IndexedDB with SQL like syntax and promises
http://jsstore.net/
MIT License
858 stars 110 forks source link

Use JsStore in my own web worker? #147

Closed amberdiehl closed 4 years ago

amberdiehl commented 4 years ago

Use JsStore in my own web worker?

Hi, I apologize in advance if this is a dumb question.

It's my understanding that IndexedDB is accessible via a web worker. I am trying to use JsStore from within my web worker but am getting errors.

When I try to establish a connection from within the worker it's not getting a reference to JsStore.js. When I establish the connection from the main thread of JS, that works, but I cannot pass that connection to the worker.

Is there a way I can do this? I do not want to use your worker for the DB operations because there are other operations I want to perform in my worker at the same time.

Thanks in advance. Amber

amberdiehl commented 4 years ago

Never mind, it was as stupid question. Needed to use importScripts();