Re: Support getElementById and other methods of ShadowRoot on DocumentFragment

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 UTC