Bind event listeners to the shadow root if a component is being rendered into one#859
Bind event listeners to the shadow root if a component is being rendered into one#859wereHamster wants to merge 2 commits intofacebook:masterfrom
Conversation
src/core/ReactDOMComponent.js
Outdated
There was a problem hiding this comment.
Can you use ExecutionEnvironment.canUseDOM?
|
@petehunt do have any further feedback on this change? |
|
Would love to see this land 👍 |
There was a problem hiding this comment.
There's Element.shadowRoot per spec http://www.w3.org/TR/shadow-dom/#api-partial-element-shadow-root, can it be used instead?
There was a problem hiding this comment.
Unfortunately no. The shadowRoot property is the ShadowRoot that is being rendered inside of the element, not the one the element is inside of.
I'm not aware of any more efficient way to determine in which ShadowRoot (if any) a given element is. But I also haven't investigated deeply.
|
Now that shadow DOM is shipping in Chrome I think we should take this. @wereHamster have you run into any other issues with shadowdom + react? |
|
I ported my whole codebase to react only and am not using Polymer anymore. So I can't comment on any issues. |
|
@wereHamster I know you said you weren't using Polymer anymore, but if you have a simple example that should work but was broken, that would be helpful for somebody who might be interested in picking it up. In the meantime, I think I'll close this out since we dropped the ball (sorry!). If you're interested in picking it back up, just reopen! |
Related discussion is in #840.