Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1776)

Issue 102890044: Make third argument to PathObserver callback path (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 11 months ago by rafaelw
Modified:
9 years, 11 months ago
Reviewers:
arv, John Messerly
Base URL:
git@github.com:Polymer/observe-js.git@master
Visibility:
Public.

Description

Make third argument to PathObserver callback path R=arv BUG=https://github.com/Polymer/observe-js/issues/52 Committed: https://github.com/Polymer/observe-js/commit/4905f0b

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -1 line) Patch
M src/observe.js View 1 chunk +1 line, -1 line 3 comments Download
M tests/test.js View 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 5
rafaelw
Committed patchset #1 manually as r4905f0b (presubmit successful).
9 years, 11 months ago (2014-05-29 20:45:51 UTC) #1
John Messerly
https://codereview.appspot.com/102890044/diff/1/src/observe.js File src/observe.js (right): https://codereview.appspot.com/102890044/diff/1/src/observe.js#newcode1033 src/observe.js:1033: this.report_([this.value_, oldValue, this.path_]); I wonder if path should be ...
9 years, 11 months ago (2014-05-29 21:08:37 UTC) #2
rafaelw
https://codereview.appspot.com/102890044/diff/1/src/observe.js File src/observe.js (right): https://codereview.appspot.com/102890044/diff/1/src/observe.js#newcode1033 src/observe.js:1033: this.report_([this.value_, oldValue, this.path_]); I like that. So how about ...
9 years, 11 months ago (2014-05-29 22:12:21 UTC) #3
rafaelw
https://codereview.appspot.com/99660045/
9 years, 11 months ago (2014-05-29 22:13:37 UTC) #4
John Messerly
9 years, 11 months ago (2014-05-29 22:33:46 UTC) #5
Message was sent while issue was closed.
https://codereview.appspot.com/102890044/diff/1/src/observe.js
File src/observe.js (right):

https://codereview.appspot.com/102890044/diff/1/src/observe.js#newcode1033
src/observe.js:1033: this.report_([this.value_, oldValue, this.path_]);
SGTM :)

On 2014/05/29 22:12:21, rafaelw wrote:
> I like that. So how about making path a "public" property (e.g. path_ -> path)
> and passing |this| as the third argument?
> 
> On 2014/05/29 21:08:36, John Messerly wrote:
> > I wonder if path should be a public field/getter in addition (or instead)? 
> > Might be easier than passing "path_" to the callback, since presumably the
> code
> > already has the PathObserver instance. (or maybe pass "this" as 3rd arg)
> > 
> > IIRC Polymer uses it somewhere too (in the "bind" code path), and they read
> > "path_".
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b