Skip to content

Commit

Permalink
Limit the meaning of "custom element" to not include is (#26524)
Browse files Browse the repository at this point in the history
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

DiffTrain build for [43a70a6](43a70a6)
  • Loading branch information
sebmarkbage committed Mar 30, 2023
1 parent dd1749c commit d9b663c
Show file tree
Hide file tree
Showing 22 changed files with 1,477 additions and 1,834 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1a1d61fed98a02c9b1bac029d0bc11c3e4db896d
43a70a610dd2cc298ab5592deebfbf8f7bbac127
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-www-modern-8f5a57f2";
var ReactVersion = "18.3.0-www-modern-b298fcd9";

// ATTENTION
// When adding new symbols to this file,
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}

var ReactVersion = "18.3.0-www-classic-26d7a5d5";
var ReactVersion = "18.3.0-www-classic-8643ce3a";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactART-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -9688,7 +9688,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "18.3.0-www-modern-132fb191",
version: "18.3.0-www-modern-b8a2f36f",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1304 = {
Expand Down Expand Up @@ -9719,7 +9719,7 @@ var internals$jscomp$inline_1304 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-132fb191"
reconcilerVersion: "18.3.0-www-modern-b8a2f36f"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1305 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Loading

0 comments on commit d9b663c

Please sign in to comment.