mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-21 07:38:07 +02:00
Enable the mozilla/avoid-removeChild
ESLint rule globally
This rule is available from https://www.npmjs.com/package/eslint-plugin-mozilla, and is enforced in mozilla-central. Note that we have a polyfill for `ChildNode.remove()` and that most cases have already been fixed, see PRs 8056 and 8138.
This commit is contained in:
parent
9767b8a9f1
commit
2eb29409bc
5 changed files with 12 additions and 5 deletions
|
@ -367,8 +367,7 @@ var Driver = (function DriverClosure() { // eslint-disable-line no-unused-vars
|
|||
while (styleSheet.cssRules.length > 0) {
|
||||
styleSheet.deleteRule(0);
|
||||
}
|
||||
let ownerNode = styleSheet.ownerNode;
|
||||
ownerNode.parentNode.removeChild(ownerNode);
|
||||
styleSheet.ownerNode.remove();
|
||||
}
|
||||
let body = document.body;
|
||||
while (body.lastChild !== this.end) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue