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

Unified Diff: test_sources/non_transformed/lib/library2.js

Issue 615913004: Add @jsify annotation. Support automatically proxying Lists and Maps to Dart in Proxies. Support co… (Closed) Base URL: https://github.com/dart-lang/js-interop.git@master
Patch Set: Created 6 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: test_sources/non_transformed/lib/library2.js
diff --git a/test_sources/non_transformed/lib/library2.js b/test_sources/non_transformed/lib/library2.js
index 13bbbe38fe091f5162b83b24a10c43add59e9c51..9dc3d859b8daa3aa71b9c339a503c113c41d9b72 100644
--- a/test_sources/non_transformed/lib/library2.js
+++ b/test_sources/non_transformed/lib/library2.js
@@ -19,3 +19,32 @@ createGizmo = function(x) {
function createJsAndDart(i) {
return new dart.test.library2.JsAndDart(i);
}
+
+function createList(a, b, c) {
+ return [a, b, c];
+}
+
+function joinList(list) {
+ if (!Array.isArray(list)) {
+ throw "Not an Array";
+ }
+ return list.join(', ');
+}
+
+function joinMap(map) {
+ var pairs = [];
+ var names = Object.keys(map);
+ for (var i in names) {
+ var name = names[i];
+ var value = map[name]
+ pairs.push(name + ': ' + value);
+ }
+ return pairs.join(', ');
+}
+
+function createMap(k1, v1, k2, v2) {
+ var m = {};
+ m[k1] = v1;
+ m[k2] = v2;
+ return m;
+}

Powered by Google App Engine
This is Rietveld 408576698