mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
13 lines
314 B
HTML
13 lines
314 B
HTML
|
<button id="abort"></button>
|
||
|
|
||
|
<script>
|
||
|
const button = document.getElementById('abort');
|
||
|
button.addEventListener('click', getJson)
|
||
|
async function getJson() {
|
||
|
const abort = new AbortController();
|
||
|
const result = fetch("/simple.json", {
|
||
|
signal: abort.signal
|
||
|
});
|
||
|
abort.abort();
|
||
|
}
|
||
|
</script>
|