This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
I thought we agreed that if we add these they'll be on Element. Given the discussion on the WHATWG list, it seems unlikely anything but getElementById() will be added there. In any event, adding these on the subclass is not the way to settle this debate.
I think that's fine. I duped the previous bug on this to 22515, but that got WONTFIX'd and lost.
*** Bug 16904 has been marked as a duplicate of this bug. ***
The WHATWG discussion linked from bug 22515: http://lists.w3.org/Archives/Public/public-whatwg-archive/2013Jun/0207.html Dimitri, are you still on board with this removal in spec and Blink? I came here from bug 27569 where I suggested what looks like a simplification from the current state in Blink, by moving getElementsBy* (not getElementById) up from Document, Element and ShadowRoot to ParentNode, causing them to appear on DocumentFragment also. The WHATWG thread amounts to "HTMLCollection is live and a PITA to implement". That's true, but it's already impossible to get rid of and implemented on ContainerNode in Blink, which makes it free to support for DocumentFragment. I'm happy to go either way here, but if it's going to be removal it's best to do it before people start to depend on ShadowRoot.getElementsBy*.
I enjoyed this: http://lists.w3.org/Archives/Public/public-whatwg-archive/2013Oct/0133.html
This is a no-op refactoring for the developer, right? We're moving getElementBy* up in prototype chain.
IIUC, Anne wants to remove getElementsBy* from ShadowRoot, meaning it could break stuff. My suggestion in bug 27569 is to move things up to the ParentNode interface, which would result in getElementsBy* becoming available on non-ShadowRoot DocumentFragment as well.
(In reply to Philip Jägenstedt from comment #6) > IIUC, Anne wants to remove getElementsBy* from ShadowRoot, meaning it could > break stuff. That seems bad. > My suggestion in bug 27569 is to move things up to the ParentNode interface, > which would result in getElementsBy* becoming available on non-ShadowRoot > DocumentFragment as well. Yes, let's do this one.
I don't understand why it has taken so long to fix this that it is now deemed a compatibility risk. Which seems somewhat spurious given that there's only one implementation.
I don't know if there's any compat risk in removing getElementsBy* from ShadowRoot in Blink, we could find out with use counters if removal seems like a worthwhile thing to aim for. The bit I'm missing is why we should try to remove getElementsBy* from ShadowRoot and keep them away from DocumentFragment. It plainly seems cleaner spec- and implementation-wise to have them ParentNode. A request to have them on DocumentFragment is what started the WHATWG thread. If other browsers would object to that I'm curious to know why. There's zero chance of getting rid of getElementsBy* from Document and Element, so there's no long-term potential for simplification that is being sacrificed.
As discussed on bug 27569, I think it is okay to remove them. Hayato-san, can you put this into your queue?
Looks everyone agreed that we should remove this from the spec asap. Let's me remove these from the spec in the next week.
Finally removed: https://github.com/w3c/webcomponents/commit/6416fdfe7fc87e47aa89aac8ce5430389b9ad653