aaronpowell / db.js

db.js is a wrapper for IndexedDB to make it easier to work against
http://aaronpowell.github.com/db.js/
MIT License
820 stars 142 forks source link

Web worker (including Service Worker) support and tests #161

Closed brettz9 closed 8 years ago

brettz9 commented 8 years ago

Addresses #106 (and #69 ).

One annoyance is that the service worker had to be placed in the root of the repository. See http://stackoverflow.com/questions/29874068/navigator-serviceworker-is-never-ready

Another minor FYI, if testing in Chrome, you may see an "error" but this can safely be ignored: http://stackoverflow.com/questions/33328579/service-worker-throwing-an-neterr-file-exists-error

brettz9 commented 8 years ago

Note that I went with self over this (and either should work anyways) because babel was converting this to undefined.

brettz9 commented 8 years ago

This PR is only failing Travis since I didn't comment out the Saucelabs in the PR. If merged with PR #160, this should work then. Note also that I've included tests for the workers so one shouldn't need to acquire too deep of an understanding of them to confirm that things are indeed working.

brettz9 commented 8 years ago

I've updated this to take into account the test and dbName changes, also merging in my blocked-events PR/branch.