mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-24 14:27:56 -05:00
Merge branch 'master' into demos
This commit is contained in:
@@ -273,7 +273,7 @@
|
||||
<h2 id="Introduction">Introduction</h2>
|
||||
|
||||
<p>
|
||||
When working on a web application that involved a lot of JavaScript, one
|
||||
When working on a web application that involves a lot of JavaScript, one
|
||||
of the first things you learn is to stop tying your data to the DOM. It's all
|
||||
too easy to create JavaScript applications that end up as tangled piles of
|
||||
jQuery selectors and callbacks, all trying frantically to keep data in
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
object.bind('test:trigger2', fn);
|
||||
object.bind('test:trigger2', fn);
|
||||
|
||||
JSLitmus.test('Events: trigger 2 functions, passing 5 arguments', function() {
|
||||
JSLitmus.test('Events: trigger 2, passing 5 args', function() {
|
||||
object.trigger('test:trigger2', 1, 2, 3, 4, 5);
|
||||
});
|
||||
|
||||
@@ -31,14 +31,14 @@
|
||||
var eventModel = new Backbone.Model;
|
||||
eventModel.bind('change', fn);
|
||||
|
||||
JSLitmus.test('Model: set Math.random() with a change event', function() {
|
||||
JSLitmus.test('Model: set rand() with an event', function() {
|
||||
eventModel.set({number: Math.random()});
|
||||
});
|
||||
|
||||
var keyModel = new Backbone.Model;
|
||||
keyModel.bind('change:number', fn);
|
||||
|
||||
JSLitmus.test('Model: set Math.random() with a key-value observer', function() {
|
||||
JSLitmus.test('Model: set rand() with an attribute observer', function() {
|
||||
keyModel.set({number: Math.random()});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user