Skip to content
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

Closed
fqueze opened this issue Jan 30, 2017 · 3 comments
Closed

Bug 1334831 - Use .remove() instead of .parentNode.removeChild #8008

fqueze opened this issue Jan 30, 2017 · 3 comments
Labels

Comments

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Jan 30, 2017

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 mozilla-central as part of https://bugzilla.mozilla.org/show_bug.cgi?id=1335048.

Edit: I suppose that we could utilize the preprocessor to change this only for the FIREFOX/MOZCENTRAL build targets, but I'm not sure if it's worth complicating the code for this case!?

@timvandermeij
Copy link
Contributor

timvandermeij commented Jan 30, 2017

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.

@timvandermeij
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants