Modern Event System: add plugin handling and forked paths #18195
+368
−84
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 4cd1e11:
|
only nits, feel free to disregard if annoying |
// which also nicely allows us to support more without needing | ||
// to add more individual code paths to support various | ||
// events that do not bubble. | ||
expect(handleImgLoadStart).toHaveBeenCalledTimes(1); |
threepointone
Mar 3, 2020
Contributor
dope
dope
...act-dom/src/events/__tests__/DOMModernPluginEventSystem-test.internal.js
Outdated
Show resolved
Hide resolved
d63d2f6
to
54be398
Fix Fix Fix
sthagen
added a commit
to sthagen/react
that referenced
this pull request
Mar 3, 2020
Modern Event System: add plugin handling and forked paths (facebook#18195)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
This PR adds more of the modern event system logic, enough that based single root/non-portal logic now works and removing the flag should result in most tests passing. Note: this PR does not affect the existing legacy event system, and the only real changes are to the new modern event system (which is behind a flag anyway). This PR consists of:
DOMModernPluginEventSystem.js
adds event plugin handling, which is basically the exact same code from the legacy event system (except refactored to use basic for loops)DOMModernPluginEventSystem-test.internal.js
that showes basic capture/bubble events working correctly with the new system (on a single root/non-portal example)ReactBrowserEventEmitter-test.internal.js
uses the correct existing depending on the modern event system flagReactDOMEventListener-test.js
disables or alters the expected outcome when using the new systemReactTreeTraversal-test.js
disables or alters the expected outcome when using the new systemEnterLeaveEventPlugin.js
alters the logic to account for the new event system having roots rather than a single document listener, plus disables the first ancestor logic for the modern event system.