dillon1000/react

Commit

Limit the meaning of "custom element" to not include `is` (#26524)

This PR has a bunch of surrounding refactoring. See individual commits.

The main change is that we no longer special case `typeof is ===
'string'` as a special case according to the
`enableCustomElementPropertySupport` flag.

Effectively this means that you can't use custom properties/events,
other than the ones React knows about on `<input is="my-input">`
extensions.

This is unfortunate but there's too many paths that are forked in
inconsistent ways since we fork based on tag name. I think __the
solution is to let all React elements set unknown properties/events in
the same way as this flag__ but that's a bigger change than this flag
implies.

Since `is` is not universally supported yet anyway, this doesn't seem
like a huge loss. Attributes still work.

We still support passing the `is` prop and turn that into the
appropriate createElement call.

@josepharhar
Browse files
Changed paths8 files
First-parent comparison
M packages/react-dom-bindings/src/client/DOMPropertyOperations.js ModifiedM packages/react-dom-bindings/src/client/ReactDOMComponent.js ModifiedM packages/react-dom-bindings/src/client/ReactDOMHostConfig.js ModifiedM packages/react-dom-bindings/src/events/plugins/ChangeEventPlugin.js ModifiedM packages/react-dom-bindings/src/server/ReactDOMServerFormatConfig.js ModifiedM packages/react-dom-bindings/src/shared/ReactDOMUnknownPropertyHook.js ModifiedR packages/react-dom-bindings/src/shared/isCustomComponent.js →packages/react-dom-bindings/src/shared/isCustomElement.js RenamedM packages/react-dom/src/__tests__/ReactDOMServerIntegrationAttributes-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…