NodeList should be iterable

External Issue #5998615

Details

Created
Dec 31, 2015
Privacy
This issue is public.
Reports
Reported by 9 people

Sign in to watch or report this issue.

Steps to reproduce

URL:

Repro Steps:

NodeList.prototype[Symbol.iterator] // undefined on Edge, should be valid iterator

Expected Results:

NodeList should support iterator.

Actual Results:

Dev Channel specific:

No

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Mara P.”

      Changed Assigned To to “Christian F.”

      Changed Assigned To to “Travis L.”

      Changed Assigned To from “Travis L.” to “IE S.”

      Changed Status to “External”

    • https://developer.mozilla.org/en-US/docs/Web/API/NodeList
      Other browsers are shipping entries(), keys(), values(), forEach() in NodeList. Developers should be able to iterate NodeList that is used in common cases like document.getElementByClassNames()

    • It will be very helpful if MSEdge team:

      1. provides some details when closing an issue.
      2. does not close an issue because it is ‘non-trivial’ to fix.

    • Sorry, ‘does not close an issue’->’does not tag an issue as External’

    • This also affects the spread operator, which fails with a “Function expected” exception when used with a NodeList. Here’s an example:

      var myArr = [...document.querySelectorAll("div")]
      

      The NodeList returned by Document.querySelectorAll should be spread into array myArr, but instead throws an exception since NodeList is not iterable. Works in Chrome, Firefox, and Safari.

    • Hello,

      Thank you for providing this information about the issue. We have confirmed the problem, and we are working on a solution for a future build of Edge. We are presently tracking this issue as a duplicate of an existing internal bug report. We look forward to additional feedback you may have on how we can improve Microsoft Edge.

      Best Wishes,
      The MS Edge Team

    You need to sign in to your Microsoft account to add a comment.

    Sign in