Skip to content

Commit

Permalink
Add return value and update docs. Fixes #1966.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Jul 1, 2015
1 parent f201980 commit 8fbc48d
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/standard/notify-path.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,18 @@

Polymer.Base._addFeature({
/**
Notify that a path has changed. For example:
this.item.user.name = 'Bob';
this.notifyPath('item.user.name', this.item.user.name);
Returns true if notification actually took place, based on
a dirty check of whether the new value was already known
* Notify that a path has changed. For example:
*
* this.item.user.name = 'Bob';
* this.notifyPath('item.user.name', this.item.user.name);
*
* @param {string} path Path that should be notified.
* @param {*} value Value of the specified path.
* @param {boolean=} fromAbove When true, specifies that the change came
* from above this element and thus upward notification is not
* necessary.
* @return {boolean} Returns true if notification actually took place,
* based on a dirty check of whether the new value was already known.
*/
notifyPath: function(path, value, fromAbove) {
var old = this._propertySetter(path, value);
Expand All @@ -92,6 +97,7 @@
this._notifyPath(path, value);
}
// console.groupEnd((this.localName || this.dataHost.id + '-' + this.dataHost.dataHost.index) + '#' + (this.id || this.index) + ' ' + path, value);
return true;
}
},

Expand Down

0 comments on commit 8fbc48d

Please sign in to comment.