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

fix(gatsby-legacy-polyfills): add dom collections to polyfills #30483

Merged
merged 1 commit into from Mar 29, 2021

Conversation

wardpeet
Copy link
Contributor

@wardpeet wardpeet commented Mar 26, 2021

Description

Enable dom iterables polyfill for nodeList.forEach and others.

You can test it with this snippet in IE11

import React from "react"

export default function Home() {
  const myRef = React.useRef()

  React.useEffect(() => {
    // console.log(myRef.current)
    myRef.current.querySelectorAll("li").forEach(node => {
      console.log(node.innerHTML)
    })
  }, [])

  return (
    <div>
      <ul ref={myRef}>
        <li>hello</li>
        <li>hi</li>
        <li>yo</li>
      </ul>
    </div>
  )
}

Related Issues

Fixes #30473

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Mar 26, 2021
@LekoArts LekoArts added topic: webpack/babel Webpack or babel and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Mar 26, 2021
@wardpeet wardpeet marked this pull request as ready for review March 26, 2021 10:00
@wardpeet wardpeet added this to To cherry-pick in V2 Release hotfixes via automation Mar 29, 2021
@wardpeet wardpeet added this to To cherry-pick in V3 Release Hotfixes via automation Mar 29, 2021
@wardpeet wardpeet added this to To cherry-pick in Release candidate via automation Mar 29, 2021
@vladar vladar merged commit 169eefe into master Mar 29, 2021
@vladar vladar deleted the fix/add-dom-iterables-polyfills branch March 29, 2021 10:12
@wardpeet wardpeet moved this from To cherry-pick to Backport PR opened in V3 Release Hotfixes Mar 29, 2021
wardpeet added a commit that referenced this pull request Mar 29, 2021
wardpeet added a commit that referenced this pull request Mar 30, 2021
… (#30532)

(cherry picked from commit 169eefe)

Co-authored-by: Ward Peeters <ward@coding-tech.com>
vladar pushed a commit that referenced this pull request Mar 30, 2021
@vladar vladar moved this from To cherry-pick to Backport PR opened in Release candidate Mar 30, 2021
vladar pushed a commit that referenced this pull request Mar 30, 2021
… (#30567)

(cherry picked from commit 169eefe)

Co-authored-by: Ward Peeters <ward@coding-tech.com>
@vladar vladar moved this from Backport PR opened to Backported in Release candidate Mar 30, 2021
@wardpeet wardpeet moved this from Backport PR opened to Backported in V3 Release Hotfixes Mar 30, 2021
@vladar vladar moved this from Backported to Archived in V3 Release Hotfixes Mar 31, 2021
@pieh pieh moved this from To cherry-pick to Backport PR opened in V2 Release hotfixes Apr 1, 2021
pieh pushed a commit that referenced this pull request Apr 1, 2021
@pieh pieh moved this from Backport PR opened to Backported in V2 Release hotfixes Apr 1, 2021
pieh pushed a commit that referenced this pull request Apr 1, 2021
… (#30616)

(cherry picked from commit 169eefe)

Co-authored-by: Ward Peeters <ward@coding-tech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: webpack/babel Webpack or babel
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

NodeList.forEach polyfill missing; IE 11 breaking
3 participants