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

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

Issue 224113003: Re-apply "Adding a mechanism to 'upgrade' the Dart type of elements" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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/src/shared_html.dart
diff --git a/tools/dom/src/shared_html.dart b/tools/dom/src/shared_html.dart
index 7c4f6960ad009f2bb7ffd1f4ec3e86b2a44a0ac8..dd67c48a87d1918ffc71277f06ea8c80d7717135 100644
--- a/tools/dom/src/shared_html.dart
+++ b/tools/dom/src/shared_html.dart
@@ -68,3 +68,12 @@ Element querySelector(String selectors) => document.querySelector(selectors);
* [CSS selector specification](http://www.w3.org/TR/css3-selectors/).
*/
ElementList querySelectorAll(String selectors) => document.querySelectorAll(selectors);
+
+/// A utility for changing the Dart wrapper type for elements.
+abstract class ElementUpgrader {
+ /// Upgrade the specified element to be of the Dart type this was created for.
+ ///
+ /// After upgrading the element passed in is invalid and the returned value
+ /// should be used instead.
+ Element upgrade(Element element);
+}
« no previous file with comments | « tools/dom/src/native_DOMImplementation.dart ('k') | tools/dom/templates/html/dartium/html_dartium.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698