Bug 16904 - [Shadow]: Consider better aligning with or just plain moving ShadowRoot interface to DOM spec
Summary: [Shadow]: Consider better aligning with or just plain moving ShadowRoot inter...
Status: RESOLVED DUPLICATE of bug 23620
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 15480
  Show dependency treegraph
 
Reported: 2012-05-01 23:09 UTC by Anne
Modified: 2014-11-19 04:53 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anne 2012-05-01 23:09:15 UTC
Exposing getElementById() etc. here but not on DocumentFragment does not make sense to me. Is NodeSelector not enough?

Selection is exposed as window.getSelection() today. Why should it be ShadowRoot.selection?

Should we actually define this interface in the DOM? Introducing new nodes outside the DOM specification seems kind of odd.
Comment 1 Dimitri Glazkov 2012-05-14 21:22:12 UTC
(In reply to comment #0)
> Exposing getElementById() etc. here but not on DocumentFragment does not make
> sense to me. Is NodeSelector not enough?

NodeSelector is quite sufficient. Are you thinking we should just remove get* methods from ShadowRoot?

> Selection is exposed as window.getSelection() today. Why should it be
> ShadowRoot.selection?

Yup, my bad. Fixed this in http://dvcs.w3.org/hg/webcomponents/rev/d694bf9b9d3c.
 
> Should we actually define this interface in the DOM? Introducing new nodes
> outside the DOM specification seems kind of odd.

I agree, I think we need to align this spec with the DOM Core and HTML specs, as we discussed at the F2F.
Comment 2 Anne 2012-05-15 09:22:46 UTC
I think we should remove the getEle* methods yes. I think we should remove "ShadowRoot implements NodeSelector;" too as ShadowRoot inherits from DocumentFragment which already has that. The same goes for innerHTML.
Comment 3 Dimitri Glazkov 2012-10-16 21:28:10 UTC
(In reply to comment #2)
> I think we should remove the getEle* methods yes. I think we should remove
> "ShadowRoot implements NodeSelector;" too as ShadowRoot inherits from
> DocumentFragment which already has that. The same goes for innerHTML.

The only quirk is that querySelector/querySelectorAll have slightly different semantics when called on ShadowRoot.
Comment 4 Anne 2014-08-05 12:55:49 UTC
Why would they have different semantics?
Comment 5 Hayato Ito 2014-11-19 04:53:34 UTC
getElementById was already removed. Let me merge this to bug 23620.

*** This bug has been marked as a duplicate of bug 23620 ***