Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(520)

Side by Side Diff: src/site/articles/improving-the-dom/index.html

Issue 10910215: fix bugs in docs (Closed) Base URL: git@github.com:dart-lang/dartlang.org.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 --- 1 ---
2 layout: default 2 layout: default
3 title: "Improving the DOM" 3 title: "Improving the DOM"
4 rel: 4 rel:
5 author: bob-nystrom 5 author: bob-nystrom
6 description: "Learn how Dart's HTML library improves the browser programming exp erience." 6 description: "Learn how Dart's HTML library improves the browser programming exp erience."
7 has-permalinks: true 7 has-permalinks: true
8 --- 8 ---
9 9
10 <h1>Improving the DOM</h1> 10 <h1>Improving the DOM</h1>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // Old: 84 // Old:
85 elem.hasAttribute('name'); 85 elem.hasAttribute('name');
86 elem.getAttribute('name') 86 elem.getAttribute('name')
87 elem.setAttribute('name', 'value'); 87 elem.setAttribute('name', 'value');
88 elem.removeAttribute('name'); 88 elem.removeAttribute('name');
89 </pre> 89 </pre>
90 </td> 90 </td>
91 <td width="50%"> 91 <td width="50%">
92 <pre> 92 <pre>
93 // New: 93 // New:
94 elem.attributes.contains('name'); 94 elem.attributes.containsKey('name');
95 elem.attributes['name']; 95 elem.attributes['name'];
96 elem.attributes['name'] = 'value'; 96 elem.attributes['name'] = 'value';
97 elem.attributes.remove('name'); 97 elem.attributes.remove('name');
98 </pre> 98 </pre>
99 </td> 99 </td>
100 </tr> 100 </tr>
101 </table> 101 </table>
102 102
103 <p>Likewise, by making <code>nodes</code> and <code>elements</code> full-feature d collections, we can get rid of a bunch of methods on <code>Element</code> and <code>Node</code>:</p> 103 <p>Likewise, by making <code>nodes</code> and <code>elements</code> full-feature d collections, we can get rid of a bunch of methods on <code>Element</code> and <code>Node</code>:</p>
104 104
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 216
217 <p> 217 <p>
218 Read the <a href="http://api.dartlang.org/html.html">dart:html API docs</a>. 218 Read the <a href="http://api.dartlang.org/html.html">dart:html API docs</a>.
219 Also see the following samples, which are included in the 219 Also see the following samples, which are included in the
220 <a href="/docs/editor/">Dart Editor</a> download and 220 <a href="/docs/editor/">Dart Editor</a> download and
221 which use the dart:html library: 221 which use the dart:html library:
222 <a href="http://code.google.com/p/dart/source/browse/trunk/dart/samples/slider/" >Slider</a> and 222 <a href="http://code.google.com/p/dart/source/browse/trunk/dart/samples/slider/" >Slider</a> and
223 <a href="http://code.google.com/p/dart/source/browse/trunk/dart/samples/sunflowe r/">Sunflower</a>. 223 <a href="http://code.google.com/p/dart/source/browse/trunk/dart/samples/sunflowe r/">Sunflower</a>.
224 </p> 224 </p>
225 225
OLDNEW
« no previous file with comments | « src/site/_includes/library-tour/html-websockets.markdown ('k') | src/site/docs/library-tour/index.markdown » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698