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

Remove the remaining IE 11 polyfills #12736

Merged
merged 1 commit into from
Dec 14, 2020

Conversation

Snuffleupagus
Copy link
Collaborator

We really ought to settle on the lowest supported versions of various browsers[1], since that should allow even more clean-up, but given that https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support explicitly lists IE 11 as unsupported after PDF.js version 2.6.347 there's a number of polyfills that are no longer needed.

Based on the MDN compatibility data, this patch thus removes the following polyfills:

Finally, this patch also attempts to update the compatibility information for the remaining polyfills.


[1] For example: It's questionable if Safari 9 should be listed as supported, given that the last release from that branch was in 2016.

We really ought to settle on the *lowest* supported versions of various browsers[1], since that should allow even more clean-up, but given that https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support *explicitly* lists IE 11 as unsupported after PDF.js version `2.6.347` there's a number of polyfills that are no longer needed.

Based on the MDN compatibility data, this patch thus removes the following polyfills:
 - `String.prototype.startsWith()`, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith#Browser_compatibility

 - `String.prototype.endsWith()`, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith#Browser_compatibility

  - `String.prototype.includes()`, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes#Browser_compatibility

 - `Array.prototype.includes()`, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes#Browser_compatibility

  - `Array.from()`, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Browser_compatibility

  - `Object.assign()`, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Browser_compatibility

  - `Math.log2()`, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log2#Browser_compatibility

  - `Number.isNaN()`, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN#Browser_compatibility

  - `Number.isInteger()`, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger#Browser_compatibility

  - `Map.prototype.entries()`, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/entries#Browser_compatibility

  - `Set.prototype.entries()`, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/entries#Browser_compatibility

  - `WeakMap`, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap#Browser_compatibility

  - `WeakSet`, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet#Browser_compatibility

  - `Symbol`, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility

Finally, this patch also attempts to update the compatibility information for the remaining polyfills.

---
[1] For example: It's questionable if Safari 9 should be listed as supported, given that the last release from that branch was in 2016.
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/580195dd5e88f1a/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/580195dd5e88f1a/output.txt

Total script time: 4.24 mins

Published

@timvandermeij timvandermeij merged commit 5354a97 into mozilla:master Dec 14, 2020
@timvandermeij
Copy link
Contributor

Looks good to me, and given that we already announced IE11 as being unsupported this change seems fine. Thanks!

@Snuffleupagus Snuffleupagus deleted the rm-IE-polyfills branch December 15, 2020 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants