Intent to Implement and ship: getElementsByTagName accepts qualified names

112 views
Skip to first unread message

TAMURA, Kent

unread,
Apr 14, 2017, 4:14:19 AM4/14/17
to blink-dev
Contact emails

Spec

Summary
getElementsByTagName() accepts qualified names as well as local names.

Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes 

Interoperability and Compatibility Risk
Very low. This is a small enhancement of an existing function.
Two other browsers already shipped this feature.

Edge: No signals.
Firefox: Shipped
Safari: Shipped
Web developers: No signals?

Is this feature fully tested by web-platform-tests?
Yes. There are some tests in web-platform-tests/dom/.

OWP launch tracking bug

Entry on the feature dashboard


--
TAMURA Kent
Software Engineer, Google


Philip Jägenstedt

unread,
Apr 14, 2017, 5:03:41 AM4/14/17
to TAMURA, Kent, blink-dev
LGTM1. Can you file an issue at https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/ if Edge is failing some of the tests? Once they are the only ones to fail some tests, they may want to prioritize it.

Dimitri Glazkov

unread,
Apr 14, 2017, 11:23:51 AM4/14/17
to Philip Jägenstedt, TAMURA, Kent, blink-dev
LGTM2

Chris Harrelson

unread,
Apr 14, 2017, 11:24:03 AM4/14/17
to Philip Jägenstedt, TAMURA, Kent, blink-dev
LGTM2

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Christian Biesinger

unread,
Apr 14, 2017, 12:32:16 PM4/14/17
to TAMURA, Kent, blink-dev
That's a weird function, why is this a good addition to the web
platform? Per the spec, this will return nodes from (potentially) a
mixture of namespaces. That seems confusing. Why not just have people
use getElementsByTagNameNS?

Christian

Johnny

unread,
Apr 14, 2017, 1:46:34 PM4/14/17
to blink-dev, tk...@chromium.org
I agree it's a weird one. If memory serves this was done in DOM Level 2 way back in 2002 or some such. It was known to basically be redundant with getElementsByTagNameNS(), but considered a convenience function for those who used namespaces in XML a lot etc. Given how old it is and the fact that Gecko has had this implementation for a decade and a half, and those who are used to DOM trees outside of the web might have ran into it in other contexts, I'd still be in favor of adding this even though blink has managed w/o this thus far.

My 2c.

Christian Biesinger

unread,
Apr 14, 2017, 2:09:45 PM4/14/17
to Johnny, blink-dev, TAMURA, Kent
Fair enough -- I didn't realize this was such an old API!

Christian

TAMURA, Kent

unread,
Jun 1, 2017, 8:48:47 PM6/1/17
to Philip Jägenstedt, blink-dev, John....@microsoft.com

John Jansen

unread,
Jun 2, 2017, 12:01:12 AM6/2/17
to TAMURA, Kent, Philip Jägenstedt, blink-dev

Thanks! I’ll make sure it gets assigned out.

PhistucK

unread,
Aug 8, 2017, 4:04:29 PM8/8/17
to John Jansen, TAMURA, Kent, Philip Jägenstedt, blink-dev

> getElementsByTagName() accepts qualified names as well as local names.

That summary tells me it actually is a superset of the previous behavior, rather than a different-set (is there a word for that? :)), but it turns out, if I understand the issues correctly, that <a:b> would no longer be found when you call getElementsByTagName("b") whereas before it did. That makes the interoperability risk higher, because it breaks code, even if that code only worked in Chrome (and formerly Safari perhaps). Too late now, but, still, it was not clear from the intent that this is a breaking change or a removal of some kind.


PhistucK

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Dave Tapuska

unread,
Aug 8, 2017, 4:14:55 PM8/8/17
to PhistucK, John Jansen, TAMURA, Kent, Philip Jägenstedt, blink-dev
I triaged this to the DOM team today as well....
https://bugs.chromium.org/p/chromium/issues/detail?id=752150

This one might have larger impact.

dave.

TAMURA, Kent

unread,
Aug 8, 2017, 8:14:20 PM8/8/17
to blink-dev, PhistucK, Dave Tapuska
On Wed, Aug 9, 2017 at 5:14 AM, Dave Tapuska <dtap...@google.com> wrote:
I triaged this to the DOM team today as well....
https://bugs.chromium.org/p/chromium/issues/detail?id=752150

This one might have larger impact.

dave.

On Tue, Aug 8, 2017 at 4:03 PM, PhistucK <phis...@gmail.com> wrote:
A bit of a fallout -

> getElementsByTagName() accepts qualified names as well as local names.

That summary tells me it actually is a superset of the previous behavior, rather than a different-set (is there a word for that? :)), but it turns out, if I understand the issues correctly, that <a:b> would no longer be found when you call getElementsByTagName("b") whereas before it did. That makes the interoperability risk higher, because it breaks code, even if that code only worked in Chrome (and formerly Safari perhaps). Too late now, but, still, it was not clear from the intent that this is a breaking change or a removal of some kind.

Actually, I wasn't aware of this incompatibility when I posted this intent. I'm sorry for the lack of the important incompatibility information.

Even though the intent had this incompatibility information, I guess the ship was approved anyway because Firefox and Safari already shipped it. However, we could have provided a warning in the Beta blog post.
Reply all
Reply to author
Forward
0 new messages