1. 5

  2. 3

    TL;DR: expected <button onclick="submit">...</button> to work with an event handler function submit(e) { ... }, but found out that it had to be <button onclick="submit(event)">...</button> (specifically, the magic word event, which is treated specially inside an onXXX attribute).

    1. 2

      :) Well the tldr would be something along the lines of event in <button onclick="submit(event)> isn’t magic, it’s a parameter in a dynamically created function, built from string concatenation, defined for event handler functions in page X of the spec.