W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2012

Re: Support getElementById and other methods of ShadowRoot on DocumentFragment

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Fri, 29 Jun 2012 15:17:33 -0700
Message-ID: <CABNRm63TjBjUY8MHCFnN1DVY+38huThvK00fJ0+Fiku4XXFCwA@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Olli Pettay <Olli.Pettay@helsinki.fi>, www-dom@w3.org
On Fri, Jun 29, 2012 at 3:09 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 6/29/12 5:30 PM, Ryosuke Niwa wrote:
>
>> Any detached DOM tree as I understand it.
>>
>
> This seems to work just fine in WebKit for me:
>
>   <!DOCTYPE html>
>   <pre><script>
>     var d = document.createElement("div");
>     d.innerHTML = '<p><span class="x">Text</span><span></**span></p>';
>     document.writeln(d.**querySelector(".x"));
>     document.writeln(d.**querySelectorAll("span").**length);
>   </script>
>
> so I'm not sure what you were being told, exactly....


Okay. Yeah, I've tested a couple of cases and they all seem to work fine.
I've probably mixed it up with something else.

Anyway, if querySelector already works, then that's even better. We should
add querySelector & querySelectorAll to DocumentFragment / ShadowRoot
instead of getElementsBy*.

- Ryosuke
Received on Friday, 29 June 2012 22:18:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 29 June 2012 22:18:27 GMT