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

Unified Diff: tools/dom/templates/html/dart2js/html_dart2js.darttemplate

Issue 27223003: Deprecate query and queryAll, also add back querySelector and querySelectorAll. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: tools/dom/templates/html/dart2js/html_dart2js.darttemplate
diff --git a/tools/dom/templates/html/dart2js/html_dart2js.darttemplate b/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
index c2868a9504b613f349195ac2d39f5215f2a47752..b41b0b0ace9ef4f771f3de26803ddb6b77177788 100644
--- a/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
+++ b/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
@@ -114,8 +114,22 @@ Window get window => JS('Window', 'window');
*/
HtmlDocument get document => JS('HtmlDocument', 'document');
-Element query(String selector) => document.query(selector);
-ElementList queryAll(String selector) => document.queryAll(selector);
+/**
+ * Alias for [querySelector]. Note this function is deprecated because its
+ * semantics will be changing in the future.
+ */
+@deprecated
+@Experimental()
+Element query(String relativeSelector) => document.query(relativeSelector);
+/**
+ * Alias for [querySelectorAll]. Note this function is deprecated because its
+ * semantics will be changing in the future.
+ */
+@deprecated
+@Experimental()
+ElementList queryAll(String relativeSelector) => document.queryAll(relativeSelector);
+Element querySelector(String selector) => document.querySelector(selector);
+ElementList querySelectorAll(String selector) => document.querySelectorAll(selector);
// Workaround for tags like <cite> that lack their own Element subclass --
// Dart issue 1990.

Powered by Google App Engine
This is Rietveld 408576698