component/per-frame — pull request #1 by TooTallNate (2014-09-21 16:34:45+00:00)
Title: Refactor: immediately invoke the function

This is a refactor that basically invokes the given `fn` immediately, as opposed to within the `raf()` callback function. `raf()` at this point is basically just used to disable the `ignoring` flag.

This has a few benefits over the previous implementation:

* Return values now work as expected
* The return value is cached, so that it can be returned while `ignoring`.
* Since it's on the same tick as when the actual `fn` was invoked now, we can do proper same-tick things like `e.preventDefault()` on an Event object.
* Tests.

As far as backwards compatibility goes, we'd probably want to do a v3.0.0 release to be safe, however I would think it would still be compatible except in weird edge cases.

@MatthewMueller thoughts?