Page MenuHomePhabricator

Remove unnecessary Javascript polyfills from portals repo
Closed, ResolvedPublic

Description

The portals repo was written with ancient browsers like IE6 in mind, and therefore still ships with ancient polyfills for ES5 features. Since browsers lower than IE9 cannot even access Wikimedia sites due to TSL 1.2 limitations, many polyfills from this file https://gerrit.wikimedia.org/r/plugins/gitiles/wikimedia/portals/+/refs/heads/master/dev/wikipedia.org/assets/js/polyfills.js should be removed.

Acceptance criteria

Remove the following methods from the polyfills.js file.

  • window.JSON
  • Array.indexOf
  • Document.querySelectorAll
  • Object.bind
  • Element.textContent
  • window.onunload

This file currently has features a global /* eslint-disable */ at the top. This comment can also be removed so the file may be properly formatted.

Event Timeline

Jdrewniak triaged this task as Medium priority.Mar 14 2021, 2:29 PM
Jdrewniak lowered the priority of this task from Medium to Low.
This comment was removed by Tsiruot.

Change 672037 had a related patch set uploaded (by Ishan Saini; owner: Ishan Saini):
[wikimedia/portals@master] Remove unnecessary Javascript polyfills from portals repository

https://gerrit.wikimedia.org/r/672037

This patch removes all the methods mentioned above and fulfills all the criterias.

Change 672037 merged by jenkins-bot:
[wikimedia/portals@master] Remove unnecessary Javascript polyfills from portals repository

https://gerrit.wikimedia.org/r/672037

Tsiruot removed Tsiruot as the assignee of this task.
Tsiruot subscribed.

Change 672515 had a related patch set uploaded (by Bharatkhatri; owner: Bharatkhatri):
[wikimedia/portals@master] Added help.js file inside gulpfile.js folder

https://gerrit.wikimedia.org/r/672515

@Tsiruot: Restoring assignee information (not sure why it was removed).

@Aklapper Oh, I thought we remove it once the task gets resolved.

@Tsiruot: Ah. :) Nah, it can be an advantage to be able to see what you worked on (thanks!). :)

Change 672515 had a related patch set uploaded (by Bharatkhatri; owner: Bharatkhatri):
[wikimedia/portals@master] Added help.js file inside gulpfile.js folder

https://gerrit.wikimedia.org/r/672515

Pppery subscribed.

(above patch is unrelated to this task and was given the wrong bug ID on initial upload by mistake)