Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add return value and update docs. Fixes #1966. #1991

Merged
merged 1 commit into from
Jul 2, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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