diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-07-19 18:32:55 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-07-19 18:32:55 +0200 |
commit | 67ad38d0a7cd319623e9f41c0c381ed5c5f6f973 (patch) | |
tree | 2d7498fd846109c0e2f5e72d74d6fa71d6895c2e /web-build/register-service-worker.js | |
parent | bbb50922bf2d80e6b510eaca35477efb75704722 (diff) |
added theme fetching
Diffstat (limited to 'web-build/register-service-worker.js')
-rw-r--r-- | web-build/register-service-worker.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/web-build/register-service-worker.js b/web-build/register-service-worker.js index ea5cca4..94ece4f 100644 --- a/web-build/register-service-worker.js +++ b/web-build/register-service-worker.js @@ -1 +1,14 @@ -"serviceWorker"in navigator&&window.addEventListener("load",(function(){navigator.serviceWorker.register("/expo-service-worker.js",{scope:"/"}).then((function(e){})).catch((function(e){console.info("Failed to register service-worker",e)}))}));
\ No newline at end of file +/* eslint-env browser */ + +if ('serviceWorker' in navigator) { + window.addEventListener('load', function () { + navigator.serviceWorker + .register('/expo-service-worker.js', { scope: '/' }) + .then(function (info) { + // console.info('Registered service-worker', info); + }) + .catch(function (error) { + console.info('Failed to register service-worker', error); + }); + }); +} |