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

Unified Diff: test/src/common/behavior_test.html

Issue 1290643006: First cut at behaviors. This just implements the lifecycle methodsportion. We may get the rest for … (Closed) Base URL: git@github.com:dart-lang/polymer-dart.git@master
Patch Set: Created 5 years, 4 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/src/common/behavior_test.html
diff --git a/test/src/common/behavior_test.html b/test/src/common/behavior_test.html
new file mode 100644
index 0000000000000000000000000000000000000000..532396534c2258ac6c5f340c2e9aeb413c762668
--- /dev/null
+++ b/test/src/common/behavior_test.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src="packages/web_components/webcomponents.min.js"></script>
+ <link rel="x-dart-test" href="behavior_test.dart">
+ <!--<script type="application/dart" src="behavior_test.dart"></script>-->
+ <script src="packages/test/dart.js"></script>
+</head>
+<body>
+<script>
+ window.JsBehavior = {
+ created: function() {
+ this.jsInvocations['created'].push([this]);
+ },
+ attached: function() {
+ this.jsInvocations['attached'].push([this]);
+ },
+ detached: function() {
+ this.jsInvocations['detached'].push([this]);
+ },
+ attributeChanged: function(name, type, value) {
+ this.jsInvocations['attributeChanged'].push([this, name, type, value]);
+ },
+ jsInvocations: {
+ 'created': [],
+ 'attached': [],
+ 'detached': [],
+ 'attributeChanged': []
+ }
+ }
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698