Merge lp://staging/~gary/launchpad/small-cleanup into lp://staging/launchpad

Proposed by Gary Poster
Status: Merged
Approved by: Gary Poster
Approved revision: no longer in the source branch.
Merged at revision: 12862
Proposed branch: lp://staging/~gary/launchpad/small-cleanup
Merge into: lp://staging/launchpad
Diff against target: 83 lines (+10/-17)
2 files modified
lib/lp/registry/javascript/structural-subscription.js (+7/-5)
lib/lp/registry/javascript/tests/test_structural_subscription.js (+3/-12)
To merge this branch: bzr merge lp://staging/~gary/launchpad/small-cleanup
Reviewer Review Type Date Requested Status
Данило Шеган (community) Approve
Review via email: mp+57979@code.staging.launchpad.net

Commit message

[r=danilo][no-qa] clean up some no-longer used cruft in the JS tests, and change a parent node to match the expected intent

Description of the change

This branch cleans up some no-longer used cruft in the JS tests, and changes a parent node to match the expected intent.

This is a follow-up from the testfix I just did for db-devel.

To post a comment you must log in.
Revision history for this message
Данило Шеган (danilo) wrote :

Nice fix. I generally dislike the fact that node.appendChild() actually returns the appended node. The pattern itself reminds me of linked lists in C, thus I expect it to return the node itself.

If you agree, perhaps it's worth splitting up into two separate statements. If not, no problem, just land as-is :)

review: Approve
Revision history for this message
Gary Poster (gary) wrote :

Thank you!

I do kinda agree, so I made the change. I also adhered do your "'var' for every variable declaration" preference here, as a "when in Rome..." sort of thing.

That said, I am concerned longer term that these are both idiomatic JavaScript/YUI, and we should consider embracing the idioms (in fact, reusing "var" is even preferred in the standard JS linter by Crockford).

But we can talk about that at a later time, in a different forum. :-)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.