js: event handlers needed event defined

Firefox didn't like not having the `event` variable passed
in to the event-handling functions.