Skip to content

Commit

Permalink
Add fetchPriority to <img> and <link> (#25927)
Browse files Browse the repository at this point in the history
<!--
  Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes. Please
provide enough information so that others can review your pull request.
The three fields below are mandatory.

Before submitting a pull request, please make sure the following is
done:

1. Fork [the repository](https://github.com/facebook/react) and create
your branch from `main`.
  2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
TestName` is helpful in development.
5. Run `yarn test --prod` to test in the production environment. It
supports the same options as `yarn test`.
6. If you need a debugger, run `yarn debug-test --watch TestName`, open
`chrome://inspect`, and press "Inspect".
7. Format your code with
[prettier](https://github.com/prettier/prettier) (`yarn prettier`).
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

Learn more about contributing:
https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

- Fixes #25682

## How did you test this change?

I tried this but it didn't work
```
yarn build --type=UMD_DEV react/index,react-dom && cd fixtures/attribute-behavior && yarn install && yarn start
```

Co-authored-by: eps1lon <silbermann.sebastian@gmail.com>

DiffTrain build for [de7d1c9](de7d1c9)
[View git log for this commit](https://github.com/facebook/react/commits/de7d1c90718ea8f4844a2219991f7115ef2bd2c5)
  • Loading branch information
sebmarkbage committed Dec 23, 2022
1 parent f011917 commit f96c1b8
Show file tree
Hide file tree
Showing 29 changed files with 49 additions and 42 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
@@ -1 +1 @@
81d4ee9ca5c405dce62f64e61506b8e155f38d8d
de7d1c90718ea8f4844a2219991f7115ef2bd2c5
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION_TRANSFORMS
@@ -1 +1 @@
81d4ee9ca5c405dce62f64e61506b8e155f38d8d
de7d1c90718ea8f4844a2219991f7115ef2bd2c5
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.classic.js
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-www-classic-81d4ee9ca-20221223";
var ReactVersion = "18.3.0-www-classic-de7d1c907-20221223";

// ATTENTION
// When adding new symbols to this file,
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.modern.js
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-www-modern-81d4ee9ca-20221223";
var ReactVersion = "18.3.0-www-modern-de7d1c907-20221223";

// ATTENTION
// When adding new symbols to this file,
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.classic.js
Expand Up @@ -643,4 +643,4 @@ exports.useSyncExternalStore = function(
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-classic-81d4ee9ca-20221223";
exports.version = "18.3.0-www-classic-de7d1c907-20221223";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.modern.js
Expand Up @@ -635,4 +635,4 @@ exports.useSyncExternalStore = function(
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-modern-81d4ee9ca-20221223";
exports.version = "18.3.0-www-modern-de7d1c907-20221223";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-profiling.classic.js
Expand Up @@ -654,7 +654,7 @@ exports.useSyncExternalStore = function(
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-classic-81d4ee9ca-20221223";
exports.version = "18.3.0-www-classic-de7d1c907-20221223";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-profiling.modern.js
Expand Up @@ -646,7 +646,7 @@ exports.useSyncExternalStore = function(
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-www-modern-81d4ee9ca-20221223";
exports.version = "18.3.0-www-modern-de7d1c907-20221223";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactART-dev.classic.js
Expand Up @@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}

var ReactVersion = "18.3.0-www-classic-81d4ee9ca-20221223";
var ReactVersion = "18.3.0-www-classic-de7d1c907-20221223";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactART-dev.modern.js
Expand Up @@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}

var ReactVersion = "18.3.0-www-modern-81d4ee9ca-20221223";
var ReactVersion = "18.3.0-www-modern-de7d1c907-20221223";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactART-prod.classic.js
Expand Up @@ -9827,7 +9827,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "18.3.0-www-classic-81d4ee9ca-20221223",
version: "18.3.0-www-classic-de7d1c907-20221223",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1338 = {
Expand Down Expand Up @@ -9858,7 +9858,7 @@ var internals$jscomp$inline_1338 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-81d4ee9ca-20221223"
reconcilerVersion: "18.3.0-next-de7d1c907-20221223"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1339 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactART-prod.modern.js
Expand Up @@ -9494,7 +9494,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "18.3.0-www-modern-81d4ee9ca-20221223",
version: "18.3.0-www-modern-de7d1c907-20221223",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1329 = {
Expand Down Expand Up @@ -9525,7 +9525,7 @@ var internals$jscomp$inline_1329 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-81d4ee9ca-20221223"
reconcilerVersion: "18.3.0-next-de7d1c907-20221223"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1330 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
3 changes: 2 additions & 1 deletion compiled/facebook-www/ReactDOM-dev.classic.js
Expand Up @@ -4390,6 +4390,7 @@ var possibleStandardNames = {
draggable: "draggable",
enctype: "encType",
enterkeyhint: "enterKeyHint",
fetchpriority: "fetchPriority",
for: "htmlFor",
form: "form",
formmethod: "formMethod",
Expand Down Expand Up @@ -42646,7 +42647,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-www-classic-81d4ee9ca-20221223";
var ReactVersion = "18.3.0-www-classic-de7d1c907-20221223";

function createPortal(
children,
Expand Down
3 changes: 2 additions & 1 deletion compiled/facebook-www/ReactDOM-dev.modern.js
Expand Up @@ -3868,6 +3868,7 @@ var possibleStandardNames = {
draggable: "draggable",
enctype: "encType",
enterkeyhint: "enterKeyHint",
fetchpriority: "fetchPriority",
for: "htmlFor",
form: "form",
formmethod: "formMethod",
Expand Down Expand Up @@ -42370,7 +42371,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-www-modern-81d4ee9ca-20221223";
var ReactVersion = "18.3.0-www-modern-de7d1c907-20221223";

function createPortal(
children,
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactDOM-prod.classic.js
Expand Up @@ -15580,7 +15580,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1770 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-81d4ee9ca-20221223",
version: "18.3.0-www-classic-de7d1c907-20221223",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2157 = {
Expand Down Expand Up @@ -15610,7 +15610,7 @@ var internals$jscomp$inline_2157 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-81d4ee9ca-20221223"
reconcilerVersion: "18.3.0-next-de7d1c907-20221223"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2158 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -15852,4 +15852,4 @@ exports.unstable_renderSubtreeIntoContainer = function(
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-81d4ee9ca-20221223";
exports.version = "18.3.0-next-de7d1c907-20221223";
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactDOM-prod.modern.js
Expand Up @@ -15141,7 +15141,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1738 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-81d4ee9ca-20221223",
version: "18.3.0-www-modern-de7d1c907-20221223",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2132 = {
Expand Down Expand Up @@ -15172,7 +15172,7 @@ var internals$jscomp$inline_2132 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-81d4ee9ca-20221223"
reconcilerVersion: "18.3.0-next-de7d1c907-20221223"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2133 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -15360,4 +15360,4 @@ exports.unstable_flushControlled = function(fn) {
}
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-81d4ee9ca-20221223";
exports.version = "18.3.0-next-de7d1c907-20221223";
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactDOM-profiling.classic.js
Expand Up @@ -16352,7 +16352,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1844 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-81d4ee9ca-20221223",
version: "18.3.0-www-classic-de7d1c907-20221223",
rendererPackageName: "react-dom"
};
(function(internals) {
Expand Down Expand Up @@ -16396,7 +16396,7 @@ var devToolsConfig$jscomp$inline_1844 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-81d4ee9ca-20221223"
reconcilerVersion: "18.3.0-next-de7d1c907-20221223"
});
assign(Internals, {
ReactBrowserEventEmitter: {
Expand Down Expand Up @@ -16625,7 +16625,7 @@ exports.unstable_renderSubtreeIntoContainer = function(
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-81d4ee9ca-20221223";
exports.version = "18.3.0-next-de7d1c907-20221223";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactDOM-profiling.modern.js
Expand Up @@ -15903,7 +15903,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1812 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-81d4ee9ca-20221223",
version: "18.3.0-www-modern-de7d1c907-20221223",
rendererPackageName: "react-dom"
};
(function(internals) {
Expand Down Expand Up @@ -15948,7 +15948,7 @@ var devToolsConfig$jscomp$inline_1812 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-81d4ee9ca-20221223"
reconcilerVersion: "18.3.0-next-de7d1c907-20221223"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = function(children, container) {
Expand Down Expand Up @@ -16123,7 +16123,7 @@ exports.unstable_flushControlled = function(fn) {
}
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-81d4ee9ca-20221223";
exports.version = "18.3.0-next-de7d1c907-20221223";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
3 changes: 2 additions & 1 deletion compiled/facebook-www/ReactDOMServer-dev.classic.js
Expand Up @@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");

var ReactVersion = "18.3.0-www-classic-81d4ee9ca-20221223";
var ReactVersion = "18.3.0-www-classic-de7d1c907-20221223";

// This refers to a WWW module.
var warningWWW = require("warning");
Expand Down Expand Up @@ -1156,6 +1156,7 @@ var possibleStandardNames = {
draggable: "draggable",
enctype: "encType",
enterkeyhint: "enterKeyHint",
fetchpriority: "fetchPriority",
for: "htmlFor",
form: "form",
formmethod: "formMethod",
Expand Down
3 changes: 2 additions & 1 deletion compiled/facebook-www/ReactDOMServer-dev.modern.js
Expand Up @@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");

var ReactVersion = "18.3.0-www-modern-81d4ee9ca-20221223";
var ReactVersion = "18.3.0-www-modern-de7d1c907-20221223";

// This refers to a WWW module.
var warningWWW = require("warning");
Expand Down Expand Up @@ -1160,6 +1160,7 @@ var possibleStandardNames = {
draggable: "draggable",
enctype: "encType",
enterkeyhint: "enterKeyHint",
fetchpriority: "fetchPriority",
for: "htmlFor",
form: "form",
formmethod: "formMethod",
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactDOMServer-prod.classic.js
Expand Up @@ -3633,4 +3633,4 @@ exports.renderToString = function(children, options) {
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
);
};
exports.version = "18.3.0-www-classic-81d4ee9ca-20221223";
exports.version = "18.3.0-www-classic-de7d1c907-20221223";
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactDOMServer-prod.modern.js
Expand Up @@ -3546,4 +3546,4 @@ exports.renderToString = function(children, options) {
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
);
};
exports.version = "18.3.0-www-modern-81d4ee9ca-20221223";
exports.version = "18.3.0-www-modern-de7d1c907-20221223";
Expand Up @@ -1157,6 +1157,7 @@ var possibleStandardNames = {
draggable: "draggable",
enctype: "encType",
enterkeyhint: "enterKeyHint",
fetchpriority: "fetchPriority",
for: "htmlFor",
form: "form",
formmethod: "formMethod",
Expand Down
3 changes: 2 additions & 1 deletion compiled/facebook-www/ReactDOMTesting-dev.classic.js
Expand Up @@ -4361,6 +4361,7 @@ var possibleStandardNames = {
draggable: "draggable",
enctype: "encType",
enterkeyhint: "enterKeyHint",
fetchpriority: "fetchPriority",
for: "htmlFor",
form: "form",
formmethod: "formMethod",
Expand Down Expand Up @@ -31171,7 +31172,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-www-classic-81d4ee9ca-20221223";
var ReactVersion = "18.3.0-www-classic-de7d1c907-20221223";

function createPortal(
children,
Expand Down
3 changes: 2 additions & 1 deletion compiled/facebook-www/ReactDOMTesting-dev.modern.js
Expand Up @@ -3791,6 +3791,7 @@ var possibleStandardNames = {
draggable: "draggable",
enctype: "encType",
enterkeyhint: "enterKeyHint",
fetchpriority: "fetchPriority",
for: "htmlFor",
form: "form",
formmethod: "formMethod",
Expand Down Expand Up @@ -38459,7 +38460,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-www-modern-81d4ee9ca-20221223";
var ReactVersion = "18.3.0-www-modern-de7d1c907-20221223";

function createPortal(
children,
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactDOMTesting-prod.classic.js
Expand Up @@ -11364,7 +11364,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1538 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-81d4ee9ca-20221223",
version: "18.3.0-www-classic-de7d1c907-20221223",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2070 = {
Expand Down Expand Up @@ -11394,7 +11394,7 @@ var internals$jscomp$inline_2070 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-81d4ee9ca-20221223"
reconcilerVersion: "18.3.0-next-de7d1c907-20221223"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2071 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -14883,4 +14883,4 @@ exports.unstable_renderSubtreeIntoContainer = function(
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-81d4ee9ca-20221223";
exports.version = "18.3.0-next-de7d1c907-20221223";
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactDOMTesting-prod.modern.js
Expand Up @@ -13996,7 +13996,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1693 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-81d4ee9ca-20221223",
version: "18.3.0-www-modern-de7d1c907-20221223",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2095 = {
Expand Down Expand Up @@ -14027,7 +14027,7 @@ var internals$jscomp$inline_2095 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-81d4ee9ca-20221223"
reconcilerVersion: "18.3.0-next-de7d1c907-20221223"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2096 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -14350,4 +14350,4 @@ exports.unstable_flushControlled = function(fn) {
}
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-next-81d4ee9ca-20221223";
exports.version = "18.3.0-next-de7d1c907-20221223";
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactTestRenderer-dev.classic.js
Expand Up @@ -23871,7 +23871,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-www-classic-81d4ee9ca-20221223";
var ReactVersion = "18.3.0-www-classic-de7d1c907-20221223";

var didWarnAboutNestedUpdates;

Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactTestRenderer-dev.modern.js
Expand Up @@ -23871,7 +23871,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-www-modern-81d4ee9ca-20221223";
var ReactVersion = "18.3.0-www-modern-de7d1c907-20221223";

var didWarnAboutNestedUpdates;

Expand Down

0 comments on commit f96c1b8

Please sign in to comment.