The `event` object will be passed as the first parameter to the event handler. So wrap the event handler with a closure to prevent `event` leaking to other functions.