Repository Public
1<!doctype html>2<html><head><meta charset="utf-8"><title>Danger</title>3<style>body{font:15px sans-serif}button,a,input{margin:4px}#cookie{position:fixed;bottom:0;left:0;right:0;background:#333;color:#fff;padding:8px}</style></head>4<body><h1>Shop</h1>5<form id="f" action="/api/side-effect/form" method="post">6 <input type="text" name="q" value="x"><button id="form-submit" type="submit">Search</button>7 <button id="form-plain" type="button" aria-expanded="false">Options</button>8 <input id="upload" type="file" name="file">9</form>10<button id="buy" onclick="fetch('/api/side-effect/buy', {method: 'POST', body: '1'})">Buy now</button>11<button id="cart">Add to cart</button>12<button id="delete">Delete account</button>13<button id="supprimer">Supprimer</button>14<button id="abonner">S’abonner</button>15<button id="envoyer">Envoyer</button>16<button id="reserver" aria-expanded="false">Réserver</button>17<button id="login" aria-haspopup="dialog">Log in</button>18<a id="dl" role="button" href="/api/side-effect/link-get">Download</a>19<a id="plain-link" role="button" href="/api/side-effect/plain-link">Details page</a>20<button id="nav" onclick="location.href='/api/side-effect/nav'">Open</button>21<button id="hidden-fetch" aria-expanded="false" onclick="var x = new XMLHttpRequest(); x.open('POST', '/api/side-effect/xhr'); x.send()">Specifications</button>22<button id="ok">OK</button>23<button id="continue">Continue</button>24<button id="suivant">Suivant</button>25<button id="mystery">Zorglub</button>26<button id="formaction" formaction="/api/side-effect/formaction">Options 2</button>27<input id="submit-outside" type="submit" value="Go">28<div onclick="fetch('/api/side-effect/ancestor', {method: 'POST'})"><button id="in-ancestor" aria-expanded="false">Dimensions</button></div>29<details id="safe"><summary>Return policy</summary><p>SAFE-DETAILS-TEXT</p></details>30<div id="cookie">We use cookies. <button id="accept">Accept all</button> <button id="refuse">Tout refuser</button></div>31<script>32for (const id of ['cart', 'delete', 'supprimer', 'abonner', 'envoyer', 'reserver', 'login', 'ok', 'continue', 'suivant', 'mystery', 'accept', 'refuse', 'formaction', 'form-plain']) {33 document.getElementById(id).addEventListener('click', () => fetch('/api/side-effect/' + id, {method: 'POST', body: 'x'}));34}35// fired on load: must all be stopped at the network layer36fetch('/api/side-effect/onload-post', {method: 'POST', body: JSON.stringify({a: 1})}).catch(() => {});37fetch('/api/side-effect/onload-delete', {method: 'DELETE'}).catch(() => {});38const x = new XMLHttpRequest(); x.open('PUT', '/api/side-effect/onload-put'); x.send('1');39try { navigator.sendBeacon('/api/side-effect/beacon', 'b'); } catch (e) {}40try { window.open('/api/side-effect/popup'); } catch (e) {}41alert('hello dialog');42</script></body></html>43