getElementsByTagName() in Chrome 60 does not find elements in namespace

196 views
Skip to first unread message

Vicky Nsenga

unread,
Aug 31, 2017, 12:20:59 PM8/31/17
to Google Chrome Developer Tools
Starting with Chrome 60, getElementsByTagName() method no longer returns elements that are in a namespace. 

With Chrome 59 and earlier, the function returned the elements.

 Does anyone have a solution/workaround or does anyone know if the problem will be handled in the next chrome updates?

PhistucK

unread,
Aug 31, 2017, 12:27:12 PM8/31/17
to Google Chrome Developer Tools
This group discusses the Developer Tools feature of Google Chrome and not general web development issues.
Please, do not continue this discussion here.

It was an intentional change with sort of unintended repercussions. :(

However, since Firefox has the same behavior and the specification defines this behavior, it is not likely to be reverted.

The solution is to add the namespace. document.getElementsByTagName("bar") should be document.getElementsByTagName("foo:bar").


PhistucK

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-developer-tools+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/1bce7ae2-ae36-4de7-92bb-c1db6e912520%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages