Commit 43a70a6
authored
Limit the meaning of "custom element" to not include
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.
@josepharharis (#26524)1 parent 1308e49 commit 43a70a6
File tree
8 files changed
+185
-253
lines changed- packages
- react-dom-bindings/src
- client
- events/plugins
- server
- react-dom/src/__tests__
8 files changed
+185
-253
lines changedLines changed: 8 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | 256 | | |
261 | 257 | | |
262 | 258 | | |
| |||
448 | 444 | | |
449 | 445 | | |
450 | 446 | | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
| 447 | + | |
456 | 448 | | |
457 | 449 | | |
458 | 450 | | |
| |||
477 | 469 | | |
478 | 470 | | |
479 | 471 | | |
480 | | - | |
| 472 | + | |
481 | 473 | | |
482 | 474 | | |
483 | 475 | | |
484 | 476 | | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
515 | 480 | | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
516 | 484 | | |
0 commit comments