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

Side by Side Diff: recipes/web/html/selector_with_scope.html

Issue 14109034: Recipes for using CSS Selectors with dart:html (Closed) Base URL: https://github.com/dart-lang/cookbook.git@master
Patch Set: Incorporated changes recommended by Seth Created 7 years, 7 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
(Empty)
1 <!DOCTYPE html>
2
3 <html>
4 <head>
5 <title>selector_with_scope</title>
6 </head>
7 <ul>
8 <li class='first'>Item 1</li>
9 <li>Item 2
10 <ul>
11 <li class='first'>Nested Item 1</li>
12 <li>Nested Item 2</li>
13 </ul>
14 </li>
15 <li>Item 3</li>
16 </ul>
17
18 <body>
19 <p id="text"></p>
20 <script type="application/dart">
21
22 import 'dart:html';
23
24 void main() {
25 Element element = query('li ul');
26 Element first = element.query('.first');
27 first.style.color = 'red';
28 }
29
30 </script>
31 <script src="packages/browser/dart.js"></script>
32 </body>
33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698