You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However you'll notice that in 15.0 that check has been completely removed and as such will always bind events to the #document element — the ownerDocument, rather than the #document-fragment.
As the events that cross the shadow boundary are retargeted to appear as though they're from the shadow host instead of the internals, React's event delegating fails to invoke the event function. In the case of 0.14 the event delegation on the #document-fragment correctly handled the event, as it was able to inspect the listenerBank before retargeting was performed — any further propagation of the event would have been unnecessary.
Now I realise React doesn't support Shadow DOM natively — however it seems as though we've taken a little step back, especially with Angular 2 and its Shadow DOM support on the horizon. I'm merely wondering as to the rationale behind the removal of the ownerDocument check, and whether we'd be happy to add it back in?
(For those people who dislike the CSS Module approach)
The text was updated successfully, but these errors were encountered:
One quick question, however — otherwise I'll investigate myself — what is the easiest way to obtain the container (in this case the #document-fragment) from inst?
I'd look at nativeContainer and topLevelWrapper; the info might need to be added if it isn't already available. I think @spicyj wrote the nativeContainer code, so he might know. Otherwise, it'll require a bit of investigation.
In
0.14
it was quite easy to render a component into a shadow root — this was due to thenodeType
check inReactDOMComponent
.However you'll notice that in
15.0
that check has been completely removed and as such will always bind events to the#document
element — theownerDocument
, rather than the#document-fragment
.As the events that cross the shadow boundary are retargeted to appear as though they're from the shadow host instead of the internals, React's event delegating fails to invoke the event function. In the case of
0.14
the event delegation on the#document-fragment
correctly handled the event, as it was able to inspect thelistenerBank
before retargeting was performed — any further propagation of the event would have been unnecessary.Now I realise React doesn't support Shadow DOM natively — however it seems as though we've taken a little step back, especially with Angular 2 and its Shadow DOM support on the horizon. I'm merely wondering as to the rationale behind the removal of the
ownerDocument
check, and whether we'd be happy to add it back in?(For those people who dislike the CSS Module approach)
The text was updated successfully, but these errors were encountered: