IE and Edge getElementsByTagName and querySelector/All treats img and svg image tag as the same tag

Confirmed Issue #7163109 • Assigned to Travis L.


Tom B.
Apr 10, 2016
This issue is public.
Found in
  • Microsoft Edge
  • Internet Explorer
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

  1. Add an html <img> tag and an svg with an <image> tag in it to a document
  2. run document.getElementsByTagName(‘img’) or docuemnt.querySelectorAll(‘img’)
  3. the result will return an array with both images.
    this also applies to document.querySelector.
    Attached a unit test that passes on Chrome, Firefox and Sfari but fails on Edge and IE (link to codepen version of the test case


Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Travis L.”

    Changed Assigned To to “Travis L.”

    Changed Status to “Confirmed”

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

Sign in