Closed Bug 1335150 Opened 7 years ago Closed 7 years ago
Node .remove() doesn't work on <option> elements
In bug 1334831 I used a script to replace .parentNode.removeChild with .remove throughout the tree. I had to exclude the dom/html/test/test_bug394700.html file because that test broke with the change. I'm attaching the portion of the script-generated patch that didn't land due to this test failure. It seems that the implementation of ChildNode.remove() in bug 856629 special cased <select> at http://searchfox.org/mozilla-central/rev/f31f538622d0dfb2d869d4babc4951f6001e9be2/dom/webidl/HTMLSelectElement.webidl#60 I'm wondering if http://searchfox.org/mozilla-central/rev/8fa84ca6444e2e01fb405e078f6d2c8da0e55723/dom/webidl/HTMLOptionsCollection.webidl#20 needs similar treatment.
No, that's HTMLOptionsCollection, which is not used in the test. HTMLOptionElement doesn't seem to have a remove() that would get in the way. How did the test fail?
(In reply to :Ms2ger (⌚ UTC+1/+2) from comment #1) > How did the test fail? See the mochitest failures in https://treeherder.mozilla.org/#/jobs?repo=try&revision=84233092757a51057c0dff3ac5485eab1e6553c1 (note: the bc failures are unrelated, they are bug 1335073).
Gah, why does that test use ok( == ) rather than is()...
This has been fixed with Bug 1345301, so we just need to update the test.
Attachment #8864021 - Flags: review?(bugs) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/1b3db2ccf37a Update test_bug394700 to use .remove instead of .parentNode.removeChild. r=smaug
You need to log in before you can comment on or make changes to this bug.