Skip to content

Commit

Permalink
Cleaning up warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Oct 25, 2010
1 parent 9d28018 commit 3ba999c
Showing 1 changed file with 25 additions and 18 deletions.
43 changes: 25 additions & 18 deletions index.html
Expand Up @@ -71,6 +71,11 @@
margin: 20px 0;
width: 550px;
}
p.warning {
font-size: 12px;
line-height: 18px;
font-style: italic;
}
div.container ul {
list-style: circle;
font-size: 12px;
Expand Down Expand Up @@ -115,6 +120,7 @@
font-family: Monaco, Consolas, "Lucida Console", monospace;
font-size: 12px;
line-height: 18px;
font-style: normal;
}
tt {
padding: 0px 3px;
Expand Down Expand Up @@ -468,14 +474,12 @@ <h2 id="Model">Backbone.Model</h2>
});
</pre>

<p>
<i>
Brief aside on </i><tt>super</tt>: <i>JavaScript does not provide
<p class="warning">
Brief aside on <tt>super</tt>: JavaScript does not provide
a simple way to call super &mdash; the function of the same name defined
higher on the prototype chain. If you override a core function like
</i><tt>set</tt>,<i> or </i><tt>save</tt>, <i>and you want to invoke the
<tt>set</tt>, or <tt>save</tt>, and you want to invoke the
parent object's implementation, you'll have to explicitly call it, along these lines:
</i>
</p>

<pre>
Expand Down Expand Up @@ -608,13 +612,11 @@ <h2 id="Model">Backbone.Model</h2>
}, 10000);
</pre>

<p>
<i>
<b>Cautionary Note:</b> When fetching or saving a model, make sure that the model is part of
a collection with a <a href="#Collection-url">url</a> property specified,
or that the model itself has a complete <a href="#Model-url">url</a> function
of its own, so that the request knows where to go.
</i>
<p class="warning">
<b>Cautionary Note:</b> When fetching or saving a model, make sure that the model is part of
a collection with a <a href="#Collection-url">url</a> property specified,
or that the model itself has a complete <a href="#Model-url">url</a> function
of its own, so that the request knows where to go.
</p>

<p id="Model-save">
Expand Down Expand Up @@ -1048,12 +1050,10 @@ <h2 id="Collection">Backbone.Collection</h2>
alert(chapters.pluck('title'));
</pre>

<p>
<i>
Brief aside: This comparator function is different than JavaScript's regular
"sort", which must return </i><tt>0</tt>, <tt>1</tt>, or <tt>-1</tt>,<i>
and is more similar to a </i><tt>sortBy</tt><i> &mdash; a much nicer API.
</i>
<p class="warning">
Brief aside: This comparator function is different than JavaScript's regular
"sort", which must return <tt>0</tt>, <tt>1</tt>, or <tt>-1</tt>,
and is more similar to a <tt>sortBy</tt><i> &mdash; a much nicer API.
</p>

<p id="Collection-sort">
Expand Down Expand Up @@ -1504,6 +1504,13 @@ <h2 id="View">Backbone.View</h2>
});
</pre>

<p class="warning">
<b>Cautionary Note:</b> The "delegateEvents" function is
limited to events that work with delegation. "focus" and "blur" do not
bubble, and cannot be delegated, and "change", "submit", and "reset"
events do not bubble in current versions of Internet Explorer.
</p>

<h2 id="examples">Examples</h2>

<p>
Expand Down

0 comments on commit 3ba999c

Please sign in to comment.