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

Anne van Kesteren annevk at annevk.nl
Tue Oct 22 12:20:59 PDT 2013


On Tue, Oct 22, 2013 at 7:42 PM, Ryosuke Niwa <rniwa at apple.com> wrote:
> On Oct 22, 2013, at 4:00 AM, Anne van Kesteren <annevk at 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/



More information about the whatwg mailing list