-
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
Bug 1334831 - Use .remove() instead of .parentNode.removeChild #8008
Comments
Looking at https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/remove#Browser_compatibility and http://caniuse.com/#feat=childnode-remove, it seems that not all browsers support this (notably Internet Explorer is missing support). Please note that the general PDF.js library is supposed to be usable cross-browser, and not just in Firefox, hence we cannot make those changes here (until such a time that we'd explicitly remove support for IE from PDF.js). Ninja edit: These changes were reverted in Edit: I suppose that we could utilize the preprocessor to change this only for the |
I agree that using the preprocessor just for this small case does not make sense and only complicates the code. We need to have cross-browser support, so let's close this as won't-fix for now. If it turns out that upstream has problems if we don't make this change (for example, if it constantly gets reverted after an update), we could use the preprocessor, but let's only do that if absolutely required. Feel free to let us know if this is the case. |
By the way, we appreciate that you keep us updated about the upstream changes. Most of the upstream changes have been merged here as well, and we have also been able to adjust the add-on code on our side so that upstream needs less ESLint exceptions, so the collaboration on this is really nice. |
Landed on mozilla-central today:
https://hg.mozilla.org/integration/mozilla-inbound/diff/a9d172aa4414/browser/extensions/pdfjs/content/build/pdf.js
https://hg.mozilla.org/integration/mozilla-inbound/diff/a9d172aa4414/browser/extensions/pdfjs/content/web/viewer.js
The text was updated successfully, but these errors were encountered: