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

Unified Diff: dart/tools/dom/src/shared_html.dart

Issue 66253002: Version 0.8.10.9 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/tools/dom/docs/docs.json ('k') | dart/tools/dom/templates/html/impl/impl_Document.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/dom/src/shared_html.dart
===================================================================
--- dart/tools/dom/src/shared_html.dart (revision 30098)
+++ dart/tools/dom/src/shared_html.dart (working copy)
@@ -30,5 +30,39 @@
@Experimental()
ElementList queryAll(String relativeSelectors) => document.queryAll(relativeSelectors);
-Element querySelector(String selector) => document.querySelector(selector);
-ElementList querySelectorAll(String selector) => document.querySelectorAll(selector);
+/**
+ * Finds the first descendant element of this document that matches the
+ * specified group of selectors.
+ *
+ * Unless your webpage contains multiple documents, the top-level
+ * [querySelector]
+ * method behaves the same as this method, so you should use it instead to
+ * save typing a few characters.
+ *
+ * [selectors] should be a string using CSS selector syntax.
+ *
+ * var element1 = document.querySelector('.className');
+ * var element2 = document.querySelector('#id');
+ *
+ * For details about CSS selector syntax, see the
+ * [CSS selector specification](http://www.w3.org/TR/css3-selectors/).
+ */
+Element querySelector(String selectors) => document.querySelector(selectors);
+
+/**
+ * Finds all descendant elements of this document that match the specified
+ * group of selectors.
+ *
+ * Unless your webpage contains multiple documents, the top-level
+ * [querySelectorAll]
+ * method behaves the same as this method, so you should use it instead to
+ * save typing a few characters.
+ *
+ * [selectors] should be a string using CSS selector syntax.
+ *
+ * var items = document.querySelectorAll('.itemClassName');
+ *
+ * For details about CSS selector syntax, see the
+ * [CSS selector specification](http://www.w3.org/TR/css3-selectors/).
+ */
+ElementList querySelectorAll(String selectors) => document.querySelectorAll(selectors);
« no previous file with comments | « dart/tools/dom/docs/docs.json ('k') | dart/tools/dom/templates/html/impl/impl_Document.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698