[Pkg-javascript-commits] [backbone] 125/173: Minor update to docs. Qualify the behaviour of fetch({reset: true}). Link doc on reset event to reset method.

Jonas Smedegaard dr at jones.dk
Wed Aug 31 07:44:11 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository backbone.

commit f55b154ad33e7abcbf26a0fa4555d2a4552e0cfc
Author: sam-at-github <sgpinkus at gmail.com>
Date:   Mon Feb 1 15:45:37 2016 +1100

    Minor update to docs. Qualify the behaviour of fetch({reset: true}). Link doc on reset event to reset method.
---
 index.html | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/index.html b/index.html
index a5b3c96..8ee2790 100644
--- a/index.html
+++ b/index.html
@@ -1003,14 +1003,14 @@ view.stopListening(model);
       <li><b>"add"</b> (model, collection, options) — when a model is added to a collection.</li>
       <li><b>"remove"</b> (model, collection, options) — when a model is removed from a collection.</li>
       <li><b>"update"</b> (collection, options) — single event triggered after any number of models have been added or removed from a collection.</li>
-      <li><b>"reset"</b> (collection, options) — when the collection's entire contents have been replaced.</li>
+      <li><b>"reset"</b> (collection, options) — when the collection's entire contents have been <a href="#Collection-reset">reset</a>.</li>
       <li><b>"sort"</b> (collection, options) — when the collection has been re-sorted.</li>
       <li><b>"change"</b> (model, options) — when a model's attributes have changed.</li>
       <li><b>"change:[attribute]"</b> (model, value, options) — when a specific attribute has been updated.</li>
       <li><b>"destroy"</b> (model, collection, options) — when a model is <a href="#Model-destroy">destroyed</a>.</li>
       <li><b>"request"</b> (model_or_collection, xhr, options) — when a model or collection has started a request to the server.</li>
-      <li><b>"sync"</b> (model_or_collection, resp, options) — when a model or collection has been successfully synced with the server.</li>
-      <li><b>"error"</b> (model_or_collection, resp, options) — when a model's or collection's request to the server has failed.</li>
+      <li><b>"sync"</b> (model_or_collection, response, options) — when a model or collection has been successfully synced with the server.</li>
+      <li><b>"error"</b> (model_or_collection, response, options) — when a model's or collection's request to the server has failed.</li>
       <li><b>"invalid"</b> (model, error, options) — when a model's <a href="#Model-validate">validation</a> fails on the client.</li>
       <li><b>"route:[name]"</b> (params) — Fired by the router when a specific route is matched.</li>
       <li><b>"route"</b> (route, params) — Fired by the router when <i>any</i> route has been matched.</li>
@@ -1986,7 +1986,8 @@ ships.add([
       you have so many models to change that you'd rather just update the collection
       in bulk. Use <b>reset</b> to replace a collection with a new list
       of models (or attribute hashes), triggering a single <tt>"reset"</tt> event
-      at the end. Returns the newly-set models.
+      on completion, and <i>without</i> triggering any add or remove events on any models.
+      Returns the newly-set models.
       For convenience, within a <tt>"reset"</tt> event, the list of any
       previous models is available as <tt>options.previousModels</tt>.<br />
       Pass <tt>null</tt> for <tt>models</tt> to empty your Collection with <tt>options</tt>.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git



More information about the Pkg-javascript-commits mailing list