1
0
Fork 0
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:
Jonas Jenwald 2018-02-10 16:19:45 +01:00
parent 9767b8a9f1
commit 2eb29409bc
5 changed files with 12 additions and 5 deletions

View file

@ -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);
}
};