summaryrefslogtreecommitdiffstats
path: root/remote/test/puppeteer/test/assets/abort-request.html
blob: 2977efa36fd7597bc29375e2354dcbcb2d0b7ebd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!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>