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 nodeListForEach helper function #3466

Closed
2 tasks
Tracked by #2621
romaricpascal opened this issue Mar 31, 2023 · 1 comment
Closed
2 tasks
Tracked by #2621

Remove the nodeListForEach helper function #3466

romaricpascal opened this issue Mar 31, 2023 · 1 comment
Milestone

Comments

@romaricpascal
Copy link
Member

romaricpascal commented Mar 31, 2023

What

Replace all calls to the nodeListForEach helper function with calls to NodeList.prototype.forEach (of for...of depending on what we support).

Remove the nodeListForEach function and related tests.

Why

As of GOV.UK Frontend v5.0, JavaScript will only run in browsers that support ES6 modules. All browsers that support ES6 modules also support NodeList.prototype.forEach, so can get rid of this helper function.

Who needs to work on this

Developers

Who needs to review this

Developers

Done when

  • Calls to nodeListForEach have been replaced with vanilla API calls
  • The nodeListForEach function has been removed
@36degrees
Copy link
Contributor

Looks like this was done as part of #3570.

@36degrees 36degrees moved this from Needs review 🔍 to Ready to release 🚀 in GOV.UK Design System cycle board May 9, 2023
@36degrees 36degrees modified the milestones: v5.x-candidate, v5.0 May 9, 2023
@colinrotherham colinrotherham removed their assignment Aug 23, 2023
@36degrees 36degrees moved this from Ready to release 🚀 to Done 🏁 in GOV.UK Design System cycle board Dec 8, 2023
peteryates added a commit to DFE-Digital/npq-registration that referenced this issue Feb 23, 2024
Favour using the JavaScript native $nodelist.forEach(...) instead

See alphagov/govuk-frontend#3466
peteryates added a commit to DFE-Digital/npq-registration that referenced this issue Feb 23, 2024
Favour using the JavaScript native $nodelist.forEach(...) instead

See alphagov/govuk-frontend#3466
peteryates added a commit to DFE-Digital/npq-registration that referenced this issue Feb 26, 2024
Favour using the JavaScript native $nodelist.forEach(...) instead

See alphagov/govuk-frontend#3466
peteryates added a commit to DFE-Digital/npq-registration that referenced this issue Feb 26, 2024
Favour using the JavaScript native $nodelist.forEach(...) instead

See alphagov/govuk-frontend#3466
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants