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

Unified Diff: test/codegen/sunflower/dom.dart

Issue 1145833004: fixes #173, ability to use native JS indexers (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: merged Created 5 years, 6 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: test/codegen/sunflower/dom.dart
diff --git a/test/codegen/sunflower/dom.dart b/test/codegen/sunflower/dom.dart
index e41c7561f8961bb21dd47998dd585a16ddec6f1e..9a5f2668582d7ca4182213f6fe744274aa6c698d 100644
--- a/test/codegen/sunflower/dom.dart
+++ b/test/codegen/sunflower/dom.dart
@@ -23,6 +23,7 @@ external Document get document;
@JsName(name: 'Document')
abstract class Document {
+ Element createElement(String name);
Element querySelector(String selector);
}
@@ -30,10 +31,26 @@ abstract class Document {
abstract class Element {
void addEventListener(String type, EventListener callback, [bool capture]);
String textContent;
+ NodeList get childNodes;
+}
+
+@JsName()
+class Node {}
+
+@JsName()
+class NodeList {
+ external NodeList();
+ external num get length;
+ external set length(num _);
+ external Node item(num index);
+
+ external Node operator [](num index);
+ external void operator []=(num index, Node);
}
typedef void EventListener(Event e);
+@JsName()
abstract class Event {}
@JsName(name: 'HTMLInputElement')
« test/codegen/expect/sunflower/dom.js ('K') | « test/codegen/expect/sunflower/dom.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698