Closed
Description
Property observers work when custom element is instantiated, but never after that. No errors in console. Here is the javascript from the custom element definition used in my test:
var ChatUser = Polymer({
is: "chat-user",
properties: {
user: Object
},
constructor: function (user) {
this.user = user;
},
observers: [
"userStatusChanged(user.status)"
],
userStatusChanged: function (status) {
console.log("updating status", status);
this.notifyPath("user.status", status);
}
});
Testing the custom element's observer:
var userData = {username: "Bob", status: "Offline"};
var user = new ChatUser(userData); // console logs "updating status Offline"
// change status
userData.status = "Online"; // observer ignores this
Metadata
Assignees
Labels
No labels