Use self iso window so the library can be used in a worker.#8
Use self iso window so the library can be used in a worker.#8koenvd wants to merge 1 commit intonponiros:masterfrom
Conversation
|
Hi there, thanks for the pull request. Have you tested this in a worker? More specifically have you tried creating a CUID? As far as I understand this will not work because of Cuid was in the mean time updated to work with Node.js and if we also update we should be able to install it via npm and load via webpack. Is this something that you would be willing to try and doing? I don't have much time unfortunately. If not I can just merge the pull request and maybe add a note that |
|
Good point.
But I also don't understand immediately why the Noticed as well that the event handlers of 'online' & 'offline' must be added to the initial evaluation of the worker script (Have a warning like Event handler of 'online' event must be added on the initial evaluation of worker script.). So there is some extra work todo as well ... Will look into it a bit more. |
|
For some reason I didn't want to use dexie to create the IDs so I added Thanks for the info regarding |
Fix for using the library in a worker where window is not defined causing an error to be thrown when the SyncClient is loaded.