-
Notifications
You must be signed in to change notification settings - Fork 48.5k
Make events propagate through shadow DOMs. #4150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cc @sebmarkbage |
} | ||
var path = bookKeeping.nativeEvent.path; | ||
var topLevelTargetID; | ||
if (path != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we split these branches into two functions? That avoids some nesting hell and also allows us to put a name to this code which is built-in documentation! (Also avoids the need to call the iterator variable j
instead of i
.)
d5f82af
to
1df093e
Compare
@sebmarkbage new diff is up. |
dee3e35
to
a923bb8
Compare
Thanks for doing this, no more workarounds! I hope this will get merged into the next release of react! |
module.exports = window.WebComponents; | ||
if (typeof module !== 'undefined') { | ||
module.exports = window.WebComponents; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this hack needed again? There are no examples here so it shouldn't be needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the unit tests run in debug mode, we load webcomponents in the wrapper html and module isn't defined.
Thanks for this!! :) |
Really appreciate this pull request! Hope it gets merged in the 0.14 timeframe! |
Ran the perf test, event handling took between one tenth and two tenths of a millisecond. The new implementation looked ~2 hundredths of a millisecond slower, but I could totally believe that's within the noise of the measurement. I think that's within a reasonable range (certainly for a beta release, we can try to optimize later if we feel it's necessary). As per conversation with @sebmarkbage the perf test was the only thing blocking this, so I'm going to mark this as accepted as per that conversation. |
Make events propagate through shadow DOMs.
Make events propagate through shadow DOMs. This is necessary for WebComponents, which often render into shadow DOMs, through which events may need to propagate.