ractivejs/ractive — pull request #1264 by martypdx (2014-09-25 18:32:56+00:00)
Title: Default event object deprecation

This PR considers removing the implicit inclusion of the `event` object on proxy events.

The mismatch between proxy events and `ractive.fire()` calls is a frequent source of confusion for those learning ractive (and sometimes an architectural impediment for those of us who are aware of the difference). With PR #1263, the event object now is included as `this.event` in __all__ handlers, so passing it in as an argument is not strictly necessary.

Access the the `event` object in the proxy event handlers would be like methods and still be available to use as an argument.

As going back to modify all your proxy event handlers is an admitted chore, I have added an option `eventObject` which you can set to `true` to maintain the old behavior. It will come with a deprecation warning in debug mode.

I will let this PR sit for a bit in case there's controversy or discussion.

@Rich-Harris At first I was going to hack a parallel implementation of handling the event object in the arguments, but instead I'll try and bring those code bases back together. What was the motivation of a separate parsing structure for arguments of a method vs those of the proxy event? It would seem at the end of the day, they should parse to the same representation, but maybe that's a naive assumption.