DOM spec has changed for this: https://github.com/whatwg/dom/issues/143 https://dom.spec.whatwg.org/#dom-document-getelementsbytagname WebKit nightly (https://trac.webkit.org/changeset/204441) and Firefox match the spec, we should consider trying to change too.
This behavior has just shipped in Safari 10.1. It would be great to align Chrome with Firefox/Safari and the spec for interoperability.
The intent was approved. https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/jBph1e0CekY I don't have a plan to implement this soon. Contribution is welcome.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5025bccfe31b6c49a1e868d58568a89c75b3f338 commit 5025bccfe31b6c49a1e868d58568a89c75b3f338 Author: shanmuga.m <shanmuga.m@samsung.com> Date: Sun May 14 23:10:24 2017 getElementsByTagName() should take a qualifiedName in parameter getElementsByTagName() should take a qualifiedName in parameter, not a localName, according to the latest DOM specification: https://dom.spec.whatwg.org/#dom-document-getelementsbytagname https://dom.spec.whatwg.org/#concept-getelementsbytagname Webkit patch: https://trac.webkit.org/changeset/204441/ Intent to implement and ship: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/jBph1e0CekY BUG= 645165 Review-Url: https://codereview.chromium.org/2868823002 Cr-Commit-Position: refs/heads/master@{#471643} [modify] https://crrev.com/5025bccfe31b6c49a1e868d58568a89c75b3f338/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Document-getElementsByTagName-expected.txt [delete] https://crrev.com/3639139a6216af6f66840f8348622d45ba06d5b9/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Document-getElementsByTagName-xhtml-expected.txt [modify] https://crrev.com/5025bccfe31b6c49a1e868d58568a89c75b3f338/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Element-getElementsByTagName-expected.txt [delete] https://crrev.com/3639139a6216af6f66840f8348622d45ba06d5b9/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/case-expected.txt [modify] https://crrev.com/5025bccfe31b6c49a1e868d58568a89c75b3f338/third_party/WebKit/Source/core/dom/ContainerNode.cpp [modify] https://crrev.com/5025bccfe31b6c49a1e868d58568a89c75b3f338/third_party/WebKit/Source/core/dom/ContainerNode.h [modify] https://crrev.com/5025bccfe31b6c49a1e868d58568a89c75b3f338/third_party/WebKit/Source/core/dom/NodeListsNodeData.cpp [modify] https://crrev.com/5025bccfe31b6c49a1e868d58568a89c75b3f338/third_party/WebKit/Source/core/dom/NodeListsNodeData.h [modify] https://crrev.com/5025bccfe31b6c49a1e868d58568a89c75b3f338/third_party/WebKit/Source/core/dom/TagCollection.cpp [modify] https://crrev.com/5025bccfe31b6c49a1e868d58568a89c75b3f338/third_party/WebKit/Source/core/dom/TagCollection.h [modify] https://crrev.com/5025bccfe31b6c49a1e868d58568a89c75b3f338/third_party/WebKit/Source/core/html/CollectionType.h [modify] https://crrev.com/5025bccfe31b6c49a1e868d58568a89c75b3f338/third_party/WebKit/Source/core/html/HTMLCollection.cpp [modify] https://crrev.com/5025bccfe31b6c49a1e868d58568a89c75b3f338/third_party/WebKit/Source/core/html/HTMLTagCollection.cpp [modify] https://crrev.com/5025bccfe31b6c49a1e868d58568a89c75b3f338/third_party/WebKit/Source/core/html/HTMLTagCollection.h
Issue 738372 has been merged into this issue.
Comment 1 by tkent@chromium.org
, Sep 9 2016