Skip to content

events: support event handlers

Adds a utility function to add support for EventTargets with event handlers. These are things like document.body.onclick where there is special behavior. See the note about inline handlers here for more info.

This PR adds a utility function defineEventHandler that defines an event handler.

cc @addaleax you asked about this :] cc @janell, you might want to use this for onabort rather than defining it ad-hoc.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading