mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +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
|
@ -152,6 +152,7 @@ PDFJS.compatibilityChecked = true;
|
|||
}
|
||||
Element.prototype.remove = function () {
|
||||
if (this.parentNode) {
|
||||
// eslint-disable-next-line mozilla/avoid-removeChild
|
||||
this.parentNode.removeChild(this);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue