Add iterable support to NodeList et al. was: (JavaScript Bug When Referencing Variable Storing Attribute Selector String)

Fixed Issue #10232708

Details

Author
John D.
Created
Dec 16, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
  • Internet Explorer
Reports
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

I have an attribute selector stored as a string. I pass it as an argument to querySelectorAll as in the code below. An error is thrown. See screenshot.

const ITEM = '[data-showflex="container"]',
    STATECLASS = 'show';

function showAllItems() {
    document.querySelectorAll(ITEM).forEach((item) => item.classList.add(STATECLASS));
}
function hideAllItems() {
    document.querySelectorAll(ITEM).forEach((item) => item.classList.remove(STATECLASS));
}

Attachments

1 attachment

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Brad E.”

    Changed Assigned To to “Travis L.”

    Changed Assigned To from “Travis L.” to “Jeff W.”

    Changed Status to “Confirmed”

    Changed Title from “JavaScript Bug When Referencing Variable Storing Attribute Selector String” to “Add iterable support to NodeList et al. was: (JavaScript Bug When Referencing Variable Storing Attribute Selector String)”

    Changed Assigned To to “Jeff W.”

    Changed Status from “Confirmed” to “Fixed”

  • 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