[Reapply] Make "on" work with any event name

It looks like 1bd360e800ad186e95a5b0ef0acde2a37d978ed7 ("Check in updated native code") reverted my pull request #5. Here is another request to reapply that change.

Is there a public upstream for the native code where I would be better submitting this?