Add support for onfoo properties

Wrap all onfoo properties so that the function is called with a wrapped event
object.

Fixes #146