Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleaning up warnings

  • Loading branch information...
commit 3ba999c8b3a92bffd10cfa39c7b331f2a3fda5a4 1 parent 9d28018
@jashkenas jashkenas authored
Showing with 25 additions and 18 deletions.
  1. +25 −18 index.html
View
43 index.html
@@ -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;
@@ -115,6 +120,7 @@
font-family: Monaco, Consolas, "Lucida Console", monospace;
font-size: 12px;
line-height: 18px;
+ font-style: normal;
}
tt {
padding: 0px 3px;
@@ -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>
@@ -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">
@@ -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">
@@ -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>
Please sign in to comment.
Something went wrong with that request. Please try again.