Closed Bug 1345253 Opened 3 years ago Closed 3 years ago

Use element.firstChild.remove() instead of element.removeChild(element.firstChild)

Categories

(Firefox Build System :: Lint and Formatting, enhancement)

3 Branch
enhancement
Not set

Tracking

(firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(3 files)

Attached file xpcshell script
I missed this case when I worked on bug 1334831. It's straight forward to script and lint.
No hand editing at all here. Will of course push to try.
Attachment #8844650 - Flags: review?(jaws)
Depends on: 1345301
I filed bug 1345301 for what looks like an actual bug.

The other failure was because .remove() doesn't return the removed node, and maction-dynamic-embellished-op.html uses removeChild's return value.
Comment on attachment 8844650 [details] [diff] [review]
Tweak to the eslint rule + script generated patch

Review of attachment 8844650 [details] [diff] [review]:
-----------------------------------------------------------------

rs=me, I reviewed the avoid-removeChild.js changes and package.json closely. All other files I skimmed through.
Attachment #8844650 - Flags: review?(jaws) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a2b467e5660da4ed8dc7a5ef3077b357aba087f
Bug 1345253 - Use element.firstChild.remove() instead of element.removeChild(element.firstChild), r=jaws.
https://hg.mozilla.org/mozilla-central/rev/1a2b467e5660
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Product: Testing → Firefox Build System
Version: Version 3 → 3 Branch
You need to log in before you can comment on or make changes to this bug.