Commit Graph

18 Commits

Author SHA1 Message Date
Brad Dunbar
7828d6d22d Prefer on/off over bind/unbind. 2012-06-03 15:06:44 -04:00
Sam Breed
f4ebee0406 adding the expected argument to all tests 2012-06-02 18:07:11 -06:00
Brad Dunbar
83a24bb2d5 Fix #1310 - off does not skip consecutive events. 2012-05-14 07:53:01 -04:00
Brad Dunbar
c4297e5e2e Fix #1282 - "all" callback list is retrieved for each event. 2012-05-04 13:28:17 -04:00
Brad Dunbar
70005fdd04 Update QUnit.
* Use `deepEqual` in place of `same`.
* Expect 0 tests where appropriate.
* Update view test to use #qunit-fixture.
* Remove `QUnit.config.reorder = false;`.
2012-05-02 20:54:27 -04:00
Brad Dunbar
af30bcf3ca off is chainable when there are no events. 2012-04-04 05:52:54 -07:00
Brad Dunbar
fb27097835 Fix #1105 - Add convenience overloads for off. 2012-03-17 09:02:23 -04:00
Brad Dunbar
8b285c6c83 on is a noop if no callback is provided 2012-02-14 15:22:27 -05:00
Brad Dunbar
397d11e340 equals is deprecated; use equal instead
http://docs.jquery.com/QUnit/equal#actualexpectedmessage
2012-01-17 23:52:12 -05:00
Brad Dunbar
9df6387d9e trigger all for each event 2012-01-13 18:58:11 -05:00
Jeremy Ashkenas
5aa4fda9ba Fixes #640 -- adds the ability to bind/unbind/trigger (on/off/trigger) multiple, space separated events, after jQuery. 2012-01-13 16:01:59 -05:00
Jeremy Ashkenas
51335bf10f Fixes #641 -- on and off are now the preferred names for bind and unbind, following jQuery. 2012-01-13 15:27:57 -05:00
Brad Dunbar
47e1f7e6c8 (un)bind does not alter callback list during trigger 2012-01-13 08:24:47 -05:00
Brad Dunbar
de2430554e implement callbacks as linked list 2011-10-31 07:15:03 -04:00
Keith Cirkel
6ef6f759b6 Add a third "context" argument to Backbone.Event.Bind which, when passed, will bind the callback to the provided context.
Example:

	Backbone.Event.Bind('event', this.event, this);

Before this commit the way to do this was as follows:

	Backbone.Event.Bind('event', _.bind(this.event, this));
2011-07-25 22:47:48 +01:00
Jeremy Ashkenas
37ddad508d Issue #309, more sophisticated event handling, for unbinding events in the midst of them firing. 2011-04-18 16:39:26 -04:00
Jeremy Ashkenas
b085fa0099 Events#trigger ... making it safe to unbind your own event within a trigger() call. 2010-12-02 09:59:26 -05:00
Jeremy Ashkenas
e7ce57cc1d Adding the beginnings of a speed suite to the Test page. 2010-10-14 14:46:53 -04:00