diff options
Diffstat (limited to 'remote/test/puppeteer/test/assets/abort-request.html')
-rw-r--r-- | remote/test/puppeteer/test/assets/abort-request.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/remote/test/puppeteer/test/assets/abort-request.html b/remote/test/puppeteer/test/assets/abort-request.html new file mode 100644 index 0000000000..77c056a422 --- /dev/null +++ b/remote/test/puppeteer/test/assets/abort-request.html @@ -0,0 +1,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>
\ No newline at end of file |