diff options
Diffstat (limited to 'js/inknswitch/ink.js')
-rw-r--r-- | js/inknswitch/ink.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/inknswitch/ink.js b/js/inknswitch/ink.js index b9fc758..dbfa0e4 100644 --- a/js/inknswitch/ink.js +++ b/js/inknswitch/ink.js @@ -1,3 +1,13 @@ +if ('serviceWorker' in navigator) { + navigator.serviceWorker.register('./sw.js') + .then(function(registration) { + console.log('Service Worker registered with scope:', registration.scope); + }) + .catch(function(err) { + console.log('Service Worker registration failed:', err); + }); + } + document.getElementById('noteArea').focus(); // ensures that textarea is focused when the page loads const canvas = document.getElementById('drawingArea'); |