mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 13:45:36 +03:00
13 lines
408 B
HTML
13 lines
408 B
HTML
<script>
|
|
window.registrationPromise = navigator.serviceWorker.register('sw.js');
|
|
window.activationPromise = new Promise(resolve => navigator.serviceWorker.oncontrollerchange = resolve);
|
|
|
|
async function fetchDummy(name) {
|
|
const response = await fetch(name);
|
|
if (!response.ok)
|
|
return 'FAILURE: ' + response.statusText;
|
|
const text = await response.text();
|
|
return text;
|
|
}
|
|
</script>
|