Skip to content

Commit b437e4d

Browse files
committed
[Float] Nonce preload support (#26939)
Some browsers, with some CSP configuration, will not preload a script if the prelaod link tag does not provide a valid nonce attribute. This change adds the ability to specify a nonce for `ReactDOM.preload(..., { as: "script" })` DiffTrain build for [86acc10](86acc10)
1 parent 1d94a43 commit b437e4d

21 files changed

+48
-32
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a7bf5ba614c6ddbd1eb3057c71f72efd1b6c21a9
1+
86acc10f2596e1a6fe2fd57a5b325de85175800b

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-www-modern-180bd813";
30+
var ReactVersion = "18.3.0-www-modern-5fb44b73";
3131

3232
// ATTENTION
3333
// When adding new symbols to this file,

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
6969
return self;
7070
}
7171

72-
var ReactVersion = "18.3.0-www-modern-0a8a0f8c";
72+
var ReactVersion = "18.3.0-www-modern-520e6c62";
7373

7474
var LegacyRoot = 0;
7575
var ConcurrentRoot = 1;

compiled/facebook-www/ReactART-prod.modern.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9858,7 +9858,7 @@ var slice = Array.prototype.slice,
98589858
return null;
98599859
},
98609860
bundleType: 0,
9861-
version: "18.3.0-www-modern-27da91db",
9861+
version: "18.3.0-www-modern-e8821afc",
98629862
rendererPackageName: "react-art"
98639863
};
98649864
var internals$jscomp$inline_1298 = {
@@ -9889,7 +9889,7 @@ var internals$jscomp$inline_1298 = {
98899889
scheduleRoot: null,
98909890
setRefreshHandler: null,
98919891
getCurrentFiber: null,
9892-
reconcilerVersion: "18.3.0-www-modern-27da91db"
9892+
reconcilerVersion: "18.3.0-www-modern-e8821afc"
98939893
};
98949894
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
98959895
var hook$jscomp$inline_1299 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled/facebook-www/ReactDOM-dev.classic.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34178,7 +34178,7 @@ function createFiberRoot(
3417834178
return root;
3417934179
}
3418034180

34181-
var ReactVersion = "18.3.0-www-classic-202be78c";
34181+
var ReactVersion = "18.3.0-www-classic-3dccae4a";
3418234182

3418334183
function createPortal$1(
3418434184
children,
@@ -43823,6 +43823,7 @@ function preloadPropsFromPreloadOptions(href, as, options) {
4382343823
crossOrigin: as === "font" ? "" : options.crossOrigin,
4382443824
integrity: options.integrity,
4382543825
type: options.type,
43826+
nonce: options.nonce,
4382643827
fetchPriority: options.fetchPriority
4382743828
};
4382843829
}

compiled/facebook-www/ReactDOM-dev.modern.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34023,7 +34023,7 @@ function createFiberRoot(
3402334023
return root;
3402434024
}
3402534025

34026-
var ReactVersion = "18.3.0-www-modern-0a8a0f8c";
34026+
var ReactVersion = "18.3.0-www-modern-520e6c62";
3402734027

3402834028
function createPortal$1(
3402934029
children,
@@ -44333,6 +44333,7 @@ function preloadPropsFromPreloadOptions(href, as, options) {
4433344333
crossOrigin: as === "font" ? "" : options.crossOrigin,
4433444334
integrity: options.integrity,
4433544335
type: options.type,
44336+
nonce: options.nonce,
4433644337
fetchPriority: options.fetchPriority
4433744338
};
4433844339
}

compiled/facebook-www/ReactDOM-prod.classic.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15303,6 +15303,7 @@ function preload$1(href, options) {
1530315303
crossOrigin: "font" === as ? "" : options.crossOrigin,
1530415304
integrity: options.integrity,
1530515305
type: options.type,
15306+
nonce: options.nonce,
1530615307
fetchPriority: options.fetchPriority
1530715308
}),
1530815309
preloadPropsMap.set(key, href),
@@ -16643,7 +16644,7 @@ Internals.Events = [
1664316644
var devToolsConfig$jscomp$inline_1815 = {
1664416645
findFiberByHostInstance: getClosestInstanceFromNode,
1664516646
bundleType: 0,
16646-
version: "18.3.0-www-classic-a78c92e7",
16647+
version: "18.3.0-www-classic-c1034a44",
1664716648
rendererPackageName: "react-dom"
1664816649
};
1664916650
var internals$jscomp$inline_2184 = {
@@ -16673,7 +16674,7 @@ var internals$jscomp$inline_2184 = {
1667316674
scheduleRoot: null,
1667416675
setRefreshHandler: null,
1667516676
getCurrentFiber: null,
16676-
reconcilerVersion: "18.3.0-www-classic-a78c92e7"
16677+
reconcilerVersion: "18.3.0-www-classic-c1034a44"
1667716678
};
1667816679
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1667916680
var hook$jscomp$inline_2185 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -16916,4 +16917,4 @@ exports.unstable_renderSubtreeIntoContainer = function (
1691616917
);
1691716918
};
1691816919
exports.unstable_runWithPriority = runWithPriority;
16919-
exports.version = "18.3.0-www-classic-a78c92e7";
16920+
exports.version = "18.3.0-www-classic-c1034a44";

compiled/facebook-www/ReactDOM-prod.modern.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15533,6 +15533,7 @@ function preload$1(href, options) {
1553315533
crossOrigin: "font" === as ? "" : options.crossOrigin,
1553415534
integrity: options.integrity,
1553515535
type: options.type,
15536+
nonce: options.nonce,
1553615537
fetchPriority: options.fetchPriority
1553715538
}),
1553815539
preloadPropsMap.set(key, href),
@@ -16172,7 +16173,7 @@ Internals.Events = [
1617216173
var devToolsConfig$jscomp$inline_1774 = {
1617316174
findFiberByHostInstance: getClosestInstanceFromNode,
1617416175
bundleType: 0,
16175-
version: "18.3.0-www-modern-27da91db",
16176+
version: "18.3.0-www-modern-e8821afc",
1617616177
rendererPackageName: "react-dom"
1617716178
};
1617816179
var internals$jscomp$inline_2148 = {
@@ -16203,7 +16204,7 @@ var internals$jscomp$inline_2148 = {
1620316204
scheduleRoot: null,
1620416205
setRefreshHandler: null,
1620516206
getCurrentFiber: null,
16206-
reconcilerVersion: "18.3.0-www-modern-27da91db"
16207+
reconcilerVersion: "18.3.0-www-modern-e8821afc"
1620716208
};
1620816209
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1620916210
var hook$jscomp$inline_2149 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -16374,4 +16375,4 @@ exports.unstable_createEventHandle = function (type, options) {
1637416375
return eventHandle;
1637516376
};
1637616377
exports.unstable_runWithPriority = runWithPriority;
16377-
exports.version = "18.3.0-www-modern-27da91db";
16378+
exports.version = "18.3.0-www-modern-e8821afc";

compiled/facebook-www/ReactDOM-profiling.classic.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16078,6 +16078,7 @@ function preload$1(href, options) {
1607816078
crossOrigin: "font" === as ? "" : options.crossOrigin,
1607916079
integrity: options.integrity,
1608016080
type: options.type,
16081+
nonce: options.nonce,
1608116082
fetchPriority: options.fetchPriority
1608216083
}),
1608316084
preloadPropsMap.set(key, href),
@@ -17418,7 +17419,7 @@ Internals.Events = [
1741817419
var devToolsConfig$jscomp$inline_1900 = {
1741917420
findFiberByHostInstance: getClosestInstanceFromNode,
1742017421
bundleType: 0,
17421-
version: "18.3.0-www-classic-6cc31d50",
17422+
version: "18.3.0-www-classic-1233fa25",
1742217423
rendererPackageName: "react-dom"
1742317424
};
1742417425
(function (internals) {
@@ -17462,7 +17463,7 @@ var devToolsConfig$jscomp$inline_1900 = {
1746217463
scheduleRoot: null,
1746317464
setRefreshHandler: null,
1746417465
getCurrentFiber: null,
17465-
reconcilerVersion: "18.3.0-www-classic-6cc31d50"
17466+
reconcilerVersion: "18.3.0-www-classic-1233fa25"
1746617467
});
1746717468
assign(Internals, {
1746817469
ReactBrowserEventEmitter: {
@@ -17692,7 +17693,7 @@ exports.unstable_renderSubtreeIntoContainer = function (
1769217693
);
1769317694
};
1769417695
exports.unstable_runWithPriority = runWithPriority;
17695-
exports.version = "18.3.0-www-classic-6cc31d50";
17696+
exports.version = "18.3.0-www-classic-1233fa25";
1769617697

1769717698
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
1769817699
if (

compiled/facebook-www/ReactDOM-profiling.modern.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16302,6 +16302,7 @@ function preload$1(href, options) {
1630216302
crossOrigin: "font" === as ? "" : options.crossOrigin,
1630316303
integrity: options.integrity,
1630416304
type: options.type,
16305+
nonce: options.nonce,
1630516306
fetchPriority: options.fetchPriority
1630616307
}),
1630716308
preloadPropsMap.set(key, href),
@@ -16941,7 +16942,7 @@ Internals.Events = [
1694116942
var devToolsConfig$jscomp$inline_1859 = {
1694216943
findFiberByHostInstance: getClosestInstanceFromNode,
1694316944
bundleType: 0,
16944-
version: "18.3.0-www-modern-2704a18e",
16945+
version: "18.3.0-www-modern-d08e2742",
1694516946
rendererPackageName: "react-dom"
1694616947
};
1694716948
(function (internals) {
@@ -16986,7 +16987,7 @@ var devToolsConfig$jscomp$inline_1859 = {
1698616987
scheduleRoot: null,
1698716988
setRefreshHandler: null,
1698816989
getCurrentFiber: null,
16989-
reconcilerVersion: "18.3.0-www-modern-2704a18e"
16990+
reconcilerVersion: "18.3.0-www-modern-d08e2742"
1699016991
});
1699116992
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
1699216993
exports.createPortal = function (children, container) {
@@ -17144,7 +17145,7 @@ exports.unstable_createEventHandle = function (type, options) {
1714417145
return eventHandle;
1714517146
};
1714617147
exports.unstable_runWithPriority = runWithPriority;
17147-
exports.version = "18.3.0-www-modern-2704a18e";
17148+
exports.version = "18.3.0-www-modern-d08e2742";
1714817149

1714917150
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
1715017151
if (

0 commit comments

Comments
 (0)