-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Use ChildNode.remove
instead of ChildNode.ParentNode.removeChild
in a couple of places (bug 1334831, issue 8008)
#8056
Conversation
…in a couple of places (bug 1334831, issue 8008) Re: [bug 1334831](https://bugzilla.mozilla.org/show_bug.cgi?id=1334831) and issue 8008. Note that according to the specification, see https://dom.spec.whatwg.org/#interface-childnode, the `remove` method shouldn't throw. This is also consistent with e.g. the Firefox implementation, see http://searchfox.org/mozilla-central/rev/d3307f19d5dac31d7d36fc206b00b686de82eee4/dom/base/nsINode.cpp#1852. Obviously this isn't supported in IE (because that would be too easy), however we can easily polyfill it to avoid having to WONTFIX the bug/issue.
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/1189be09d555a1c/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/1189be09d555a1c/output.txt Total script time: 2.19 mins Published |
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/7672ac2e05bcfe9/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.215.176.217:8877/3c6af098b88dc20/output.txt |
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/3c6af098b88dc20/output.txt Total script time: 22.60 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/7672ac2e05bcfe9/output.txt Total script time: 26.65 mins
|
Nice improvement! |
Use `ChildNode.remove` instead of `ChildNode.ParentNode.removeChild` in a couple of places (bug 1334831, issue 8008)
Re: bug 1334831 and issue #8008.
Note that according to the specification, see https://dom.spec.whatwg.org/#interface-childnode, the
remove
method shouldn't throw.This is also consistent with e.g. the Firefox implementation, see http://searchfox.org/mozilla-central/rev/d3307f19d5dac31d7d36fc206b00b686de82eee4/dom/base/nsINode.cpp#1852.
Obviously this isn't supported in IE (because that would be too easy), however we can easily polyfill it to avoid having to WONTFIX the bug/issue.
Note: This seems like a better approach than doing nothing, and definitely better than using the preprocessor!
/cc @rvandermeulen