dillon1000/react
Commit
Browse files Fix #21972: Add `onResize` event to video elements (#21973)
* Fix #21972: Add `onResize` event to video elements This is a simple fix for #21972 that adds support for the `onResize` media event. I created a separate `videoEventTypes` array since I doubt anyone will want to add `onResize` to an audio event. It would simplify the code a bit to just add `resize` to the `mediaEventTypes` array, if that’s preferred. Pre-commit checklist ([source](https://reactjs.org/docs/how-to-contribute.html#sending-a-pull-request)) ✅ Fork the repository and create your branch from `main`. ✅ Run `yarn` in the repository root. ✅ If you’ve fixed a bug or added code that should be tested, add tests! ✅ Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. ✅ Run `yarn test --prod` to test in the production environment. ✅ If you need a debugger, run `yarn debug-test --watch TestName`, open chrome://inspect, and press “Inspect”. ✅ Format your code with prettier (`yarn prettier`). ✅ Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. ✅ Run the Flow typechecks (`yarn flow`). ✅ If you haven’t already, complete the CLA. * Consolidate `videoEventTypes` array into `mediaEventTypes`
Changed paths10 files
First-parent comparisonfixtures/dom/src/components/fixtures/media-events/index.js ModifiedM packages/react-dom/src/__tests__/ReactDOMEventListener-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMEventPropagation-test.js ModifiedM packages/react-dom/src/__tests__/__snapshots__/ReactTestUtils-test.js.snap ModifiedM packages/react-dom/src/events/DOMEventNames.js ModifiedM packages/react-dom/src/events/DOMEventProperties.js ModifiedM packages/react-dom/src/events/DOMPluginEventSystem.js ModifiedM packages/react-dom/src/events/ReactDOMEventListener.js ModifiedM packages/react-dom/src/events/TopLevelEventTypes.js ModifiedM packages/react-dom/src/test-utils/ReactTestUtils.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…