classList.toggle ignores second parameter on IE11

Won’t fix Issue #11865865


Jesse L.
May 2, 2017
This issue is public.
Found in
  • Internet Explorer
Standard affected
DOM Standard

Found in build #
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce


classList.toggle has a second parameter force. According to MDN:

If the second argument evaluates to true, add specified class value, and if it evaluates to false, remove it.

Setting the second attribute does not have any effect on IE11.

How to reproduce

  1. Create a div
  2. Try to unset a non-existing class with toggle: document.getElementById('mydiv').classList.toggle('someclassname', false)


The div has class someclassname

Expected behaviour

The div should not have class someclassname


You can see a live demo in:

Affected browsers

Tested on the following IE versions:

  • IE 11.0.15063.0 on Windows 10
  • IE 11.63.10586.0 on Windows 10
  • IE 11.1066.14393.0 on Windows 10


This has previously been reported to:

The issue states it should be fixed, but further comments and testing indicates it is not fixed.


0 attachments

    Comments and activity

    • Changed Steps to Reproduce

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

      Changed Status to “Won’t fix”

    • Hello,

      Thank you for providing your feedback on IE11. We are not accepting feedback on Internet Explorer through this portal any longer (unless security related). However, we are pleased to report this feature is fixed in MS Edge and is available in our latest build.

      Best Wishes,
      The MS Edge Team

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

    Sign in