mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
14 lines
330 B
HTML
14 lines
330 B
HTML
<!DOCTYPE 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> |