{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/16519","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/16519/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/16519/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/16519/events","html_url":"https://github.com/dart-lang/sdk/issues/16519","id":84565841,"number":16519,"title":"published properties are not propagating correctly in two-way binding","user":{"login":"sigmundch","id":2049220,"avatar_url":"https://avatars.githubusercontent.com/u/2049220?v=3","gravatar_id":"","url":"https://api.github.com/users/sigmundch","html_url":"https://github.com/sigmundch","followers_url":"https://api.github.com/users/sigmundch/followers","following_url":"https://api.github.com/users/sigmundch/following{/other_user}","gists_url":"https://api.github.com/users/sigmundch/gists{/gist_id}","starred_url":"https://api.github.com/users/sigmundch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sigmundch/subscriptions","organizations_url":"https://api.github.com/users/sigmundch/orgs","repos_url":"https://api.github.com/users/sigmundch/repos","events_url":"https://api.github.com/users/sigmundch/events{/privacy}","received_events_url":"https://api.github.com/users/sigmundch/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/sdk/labels/Area-Pkg","name":"Area-Pkg","color":"ededed"},{"url":"https://api.github.com/repos/dart-lang/sdk/labels/AssumedStale","name":"AssumedStale","color":"ededed"},{"url":"https://api.github.com/repos/dart-lang/sdk/labels/Pkg-Polymer","name":"Pkg-Polymer","color":"ededed"},{"url":"https://api.github.com/repos/dart-lang/sdk/labels/Priority-Unassigned","name":"Priority-Unassigned","color":"ededed"},{"url":"https://api.github.com/repos/dart-lang/sdk/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-02-04T02:09:36Z","updated_at":"2015-06-05T23:03:17Z","closed_at":"2015-06-03T13:32:54Z","body":"according to http://www.polymer-project.org/polymer.html#published-properties it should be allowed to use two-way bindings on published properties.\n\n\nThis seems to be failing in polymer.js as well, here is an example that fails in Dart:\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;!DOCTYPE HTML&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;html&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;polymer-element name=&quot;x-a&quot;&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;template&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;x-b id=&quot;b&quot; bar=&quot;{{foo}}&quot;&gt;&lt;/x-b&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/template&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/polymer-element&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;polymer-element name=&quot;x-b&quot; attributes=&quot;bar&quot;&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;template&gt;&lt;input type=&quot;checkbox&quot; checked=&quot;{{bar}}&quot;&gt;&lt;/template&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/polymer-element&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;x-a&gt;&lt;/x-a&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;body&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;script type=&quot;application/dart&quot;&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;import 'package:polymer/polymer.dart';\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;import 'dart:html';\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;import 'dart:async';\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;export 'package:polymer/init.dart';\n&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@­CustomTag('x-a')\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class A extends PolymerElement {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A.created() : super.created();\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@­observable bool foo = true;\n&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fooChanged() {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print('foo: $foo');\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\n&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@­CustomTag('x-b')\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class B extends PolymerElement {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B.created() : super.created();\n&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@­published bool bar = false;\n&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barChanged() {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print('bar: $bar');\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/script&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;/body&gt;&lt;/html&gt;\n\n\nand an example in JS:\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;script src=&quot;platform/platform.js&quot;&gt;&lt;/script&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;link rel=&quot;import&quot; href=&quot;polymer/polymer.html&quot;&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;polymer-element name=&quot;x-a&quot;&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;template&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;x-b bar=&quot;{{foo}}&quot;&gt;&lt;/x-b&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/template&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;/polymer-element&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;polymer-element name=&quot;x-b&quot; attributes=&quot;bar&quot;&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;template&gt;&lt;input type=&quot;checkbox&quot; checked=&quot;{{bar}}&quot;&gt;&lt;/template&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;/polymer-element&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;x-a&gt;&lt;/x-a&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;script&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;Polymer('x-a', {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foo: true,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fooChanged: function() {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('foo changed: ' + this.foo);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\n&nbsp;&nbsp;&nbsp;&nbsp;});\n&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;Polymer('x-b', {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bar: true,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barChanged: function() {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('bar changed: ' + this.bar);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.bar2 = !this.bar2;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\n&nbsp;&nbsp;&nbsp;&nbsp;});\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;/script&gt;\n\n\n\n\nMeanwhile, this is a way to workaround the issue:\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;!DOCTYPE HTML&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;html&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;polymer-element name=&quot;x-a&quot;&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;template&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;x-b id=&quot;b&quot; bar=&quot;{{foo}}&quot;&gt;&lt;/x-b&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/template&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/polymer-element&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;polymer-element name=&quot;x-b&quot; attributes=&quot;bar&quot;&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;template&gt;&lt;input type=&quot;checkbox&quot; checked=&quot;{{bar}}&quot;&gt;&lt;/template&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/polymer-element&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;x-a&gt;&lt;/x-a&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;body&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;script type=&quot;application/dart&quot;&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;import 'package:polymer/polymer.dart';\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;import 'dart:async';\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;export 'package:polymer/init.dart';\n&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@­CustomTag('x-a')\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class A extends PolymerElement {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A.created() : super.created();\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@­observable bool foo = true;\n&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ready() {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;super.ready();\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new Future(() {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var b = shadowRoot.querySelector('x-b');\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b.changes.listen((records) {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var r in records) {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (r.object == b &amp;&amp; r.name == #bar) {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foo = notifyPropertyChange(#foo, foo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nbsp;&nbsp;&nbsp;@­published bool bar = false;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/script&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;/body&gt;&lt;/html&gt;\n"},"comment":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/comments/109473457","html_url":"https://github.com/dart-lang/sdk/issues/16519#issuecomment-109473457","issue_url":"https://api.github.com/repos/dart-lang/sdk/issues/16519","id":109473457,"user":{"login":"DartBot","id":8958862,"avatar_url":"https://avatars.githubusercontent.com/u/8958862?v=3","gravatar_id":"","url":"https://api.github.com/users/DartBot","html_url":"https://github.com/DartBot","followers_url":"https://api.github.com/users/DartBot/followers","following_url":"https://api.github.com/users/DartBot/following{/other_user}","gists_url":"https://api.github.com/users/DartBot/gists{/gist_id}","starred_url":"https://api.github.com/users/DartBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DartBot/subscriptions","organizations_url":"https://api.github.com/users/DartBot/orgs","repos_url":"https://api.github.com/users/DartBot/repos","events_url":"https://api.github.com/users/DartBot/events{/privacy}","received_events_url":"https://api.github.com/users/DartBot/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T23:03:17Z","updated_at":"2015-06-05T23:03:17Z","body":"This issue has been moved to dart-lang/polymer-dart#116."}}