Re: [whatwg] Proposal: Adding methods like getElementById and getElementsByTagName to DocumentFragments

On Tue, Oct 22, 2013 at 7:42 PM, Ryosuke Niwa <rniwa@apple.com> wrote:
> On Oct 22, 2013, at 4:00 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
>> So do you think we should add getElementById() to ParentNode in DOM?
>
> Why not to Element?

ParentNode encompasses Document, DocumentFragment, and Element. See
http://dom.spec.whatwg.org/#parentnode

I think features that make sense on Document and Element should also
be on DocumentFragment, unless they're really not applicable for some
reason.


-- 
http://annevankesteren.nl/

Received on Tuesday, 22 October 2013 19:21:25 UTC