Skip to content

Commit

Permalink
at time of writing, grr
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Pilgrim committed Feb 12, 2011
1 parent 23e290f commit 18b4e36
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion detect.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h2 id=techniques>Detection Techniques</h2>

<h2 id=modernizr>Modernizr, an HTML5 Detection Library</h2>

<p><a href=http://www.modernizr.com/>Modernizr</a> is an open source, <abbr>MIT</abbr>-licensed JavaScript library that detects support for many <abbr>HTML5</abbr> <i class=baa>&amp;</i> <abbr>CSS3</abbr> features. At the time of writing, the latest version is 1.5. You should always use the latest version. To use it, include the following <code>&lt;script></code> element at the top of your page.
<p><a href=http://www.modernizr.com/>Modernizr</a> is an open source, <abbr>MIT</abbr>-licensed JavaScript library that detects support for many <abbr>HTML5</abbr> <i class=baa>&amp;</i> <abbr>CSS3</abbr> features. You should always use the latest version. To use it, include the following <code>&lt;script></code> element at the top of your page.

<pre style="float:left"><code>&lt;!DOCTYPE html>
&lt;html>
Expand Down
2 changes: 1 addition & 1 deletion extensibility.html
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ <h3 id=rich-snippets>Introducing Google Rich Snippets</h3>
<li>Search engines
</ol>

<p>For browsers, <abbr>HTML5</abbr> defines <a href=http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#microdata-dom-api>a set of <abbr>DOM</abbr> <abbr>APIs</abbr></a> for extracting microdata items, properties, and property values from a web page. As I write this, no browser supports this <abbr>API</abbr>. Not a single one. So that&#8217;s&hellip; kind of a dead end, at least until browsers catch up and implement the client-side <abbr>APIs</abbr>.
<p>For browsers, <abbr>HTML5</abbr> defines <a href=http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#microdata-dom-api>a set of <abbr>DOM</abbr> <abbr>APIs</abbr></a> for extracting microdata items, properties, and property values from a web page. At time of writing (February 2011), no browser supports this <abbr>API</abbr>. Not a single one. So that&#8217;s&hellip; kind of a dead end, at least until browsers catch up and implement the client-side <abbr>APIs</abbr>.

<p>The other major consumer of <abbr>HTML</abbr> is search engines. What could a search engine do with microdata properties about a person? Imagine this: instead of simply displaying the page title and an excerpt of text, the search engine could integrate some of that structured information and display it. Full name, job title, employer, address, maybe even a little thumbnail of a profile photo. Would that catch your attention? It would catch mine.

Expand Down
2 changes: 1 addition & 1 deletion forms.html
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ <h2 id=type-range>Numbers as Sliders</h2>
step="2"
value="6"></code></pre>

<p>All the available attributes are the same as <code>type="number"</code> &mdash; <code>min</code>, <code>max</code>, <code>step</code>, <code>value</code> &mdash; and they mean the same thing. The only difference is the user interface. Instead of a field for typing, browsers are expected to render <code>type="range"</code> as a slider control. At time of writing, the latest versions of Safari, Chrome, and Opera all do this. (Sadly, the iPhone renders it as a simple text box. It doesn&#8217;t even optimize its on-screen keyboard for numeric input.) All other browsers simply treat the field as <code>type="text"</code>, so there&#8217;s no reason you can&#8217;t start using it immediately.
<p>All the available attributes are the same as <code>type="number"</code> &mdash; <code>min</code>, <code>max</code>, <code>step</code>, <code>value</code> &mdash; and they mean the same thing. The only difference is the user interface. Instead of a field for typing, browsers are expected to render <code>type="range"</code> as a slider control. Safari, Chrome, and Opera all do this. (Sadly, the iPhone renders it as a simple text box. It doesn&#8217;t even optimize its on-screen keyboard for numeric input.) All other browsers simply treat the field as <code>type="text"</code>, so there&#8217;s no reason you can&#8217;t start using it immediately.

<p class=a>&#x2767;

Expand Down
2 changes: 1 addition & 1 deletion semantics.html
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ <h4>Professor Markup Says</h4>

<p>This works in all versions of Internet Explorer, all the way back to IE 6! We can extend this technique to create dummy copies of all the new <abbr>HTML5</abbr> elements at once &mdash; again, they&#8217;re never inserted into the <abbr>DOM</abbr>, so you&#8217;ll never see these dummy elements &mdash; and then just start using them without having to worry too much about non-HTML5-capable browsers.

<p>Remy Sharp has done just that, with his aptly named <a href=http://remysharp.com/2009/01/07/html5-enabling-script/><abbr>HTML5</abbr> enabling script</a>. The script has gone through 14 revisions at the time of writing, but this is the basic idea:
<p>Remy Sharp has done just that, with his aptly named <a href=http://remysharp.com/2009/01/07/html5-enabling-script/><abbr>HTML5</abbr> enabling script</a>. The script has gone through more than a dozen revisions since I started writing this book, but this is the basic idea:

<pre><code>&lt;!--[if lt IE 9]>
&lt;script>
Expand Down
2 changes: 1 addition & 1 deletion storage.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ <h3 id=limitations>Limitations in Current Browsers</h3>

<p>&#8220;5 megabytes&#8221; is how much storage space each <a href=http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0.html#origin-0>origin</a> gets by default. This is surprisingly consistent across browsers, although it is phrased as no more than a suggestion in the <abbr>HTML5</abbr> Storage specification. One thing to keep in mind is that you&#8217;re storing strings, not data in its original format. If you&#8217;re storing a lot of integers or floats, the difference in representation can really add up. Each digit in that float is being stored as a character, not in the usual representation of a floating point number.

<p>&#8220;<code>QUOTA_EXCEEDED_ERR</code>&#8221; is the exception that will get thrown if you exceed your storage quota of 5 megabytes. &#8220;No&#8221; is the answer to the next obvious question, &#8220;Can I ask the user for more storage space?&#8221; At time of writing, no browser supports any mechanism for web developers to request more storage space. Some browsers (<a href=http://dev.opera.com/articles/view/web-storage/>like Opera</a>) allow the user to control each site&#8217;s storage quota, but it is purely a user-initiated action, not something that you as a web developer can build into your web application.
<p>&#8220;<code>QUOTA_EXCEEDED_ERR</code>&#8221; is the exception that will get thrown if you exceed your storage quota of 5 megabytes. &#8220;No&#8221; is the answer to the next obvious question, &#8220;Can I ask the user for more storage space?&#8221; At time of writing (February 2011), no browser supports any mechanism for web developers to request more storage space. Some browsers (<a href=http://dev.opera.com/articles/view/web-storage/>like Opera</a>) allow the user to control each site&#8217;s storage quota, but it is purely a user-initiated action, not something that you as a web developer can build into your web application.

<p class=a>&#x2767;

Expand Down

0 comments on commit 18b4e36

Please sign in to comment.