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