<img src="/test">
<script>
navigator.serviceWorker.register('/dysw.js?cors=no-cors&match=test&url=https://shhnjk.com/test.jpeg')
.then(reg => {
// registration worked
console.log('Registration succeeded. Scope is ' + reg.scope);
}).catch(function(error) {
// registration failed
console.log('Registration failed with ' + error);
});
</script>
shhnjk / dysw.js Goto Github PK
View Code? Open in Web Editor NEWDynamic SW response via passed Parameters
License: MIT License