Re: [webcomponents] [Shadow] Need equivalent of ownerDocument for Elements in a shadow tree to get to their ShadowRoot (#315)

Bikeshed: `closestShadowRoot` to match [`Element.prototype.closest`](https://dom.spec.whatwg.org/#dom-element-closest).

@rniwa hmm I do like that a lot. The document fragment and detached node use cases are good ones. Although naming is a bit hard. I'd have a hard time justifying rootNode stopping at shadow roots instead of keeping going past them. (I guess because I think of them as "_shadow_ roots", not "shadow _roots_", if that makes any sense.) Also, do you think it would require a tree walk? If so maybe it would be better as a method instead of a getter.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/315#issuecomment-137604487

Received on Thursday, 3 September 2015 23:58:41 UTC