Skip to content

Commit ae25547

Browse files
committed
Add fetchPriority to <img> and <link>
1 parent 5fcf1a4 commit ae25547

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

fixtures/attribute-behavior/AttributeTableSnapshot.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3348,6 +3348,56 @@
33483348
| `externalResourcesRequired=(null)`| (initial)| `<null>` |
33493349
| `externalResourcesRequired=(undefined)`| (initial)| `<null>` |
33503350

3351+
## `fetchPriority` (on `<img>` inside `<div>`)
3352+
| Test Case | Flags | Result |
3353+
| --- | --- | --- |
3354+
| `fetchPriority=(string)`| (changed)| `"a string"` |
3355+
| `fetchPriority=(empty string)`| (initial)| `<empty string>` |
3356+
| `fetchPriority=(array with string)`| (changed)| `"string"` |
3357+
| `fetchPriority=(empty array)`| (initial)| `<empty string>` |
3358+
| `fetchPriority=(object)`| (changed)| `"result of toString()"` |
3359+
| `fetchPriority=(numeric string)`| (changed)| `"42"` |
3360+
| `fetchPriority=(-1)`| (changed)| `"-1"` |
3361+
| `fetchPriority=(0)`| (changed)| `"0"` |
3362+
| `fetchPriority=(integer)`| (changed)| `"1"` |
3363+
| `fetchPriority=(NaN)`| (changed, warning)| `"NaN"` |
3364+
| `fetchPriority=(float)`| (changed)| `"99.99"` |
3365+
| `fetchPriority=(true)`| (initial, warning)| `<empty string>` |
3366+
| `fetchPriority=(false)`| (initial, warning)| `<empty string>` |
3367+
| `fetchPriority=(string 'true')`| (changed)| `"true"` |
3368+
| `fetchPriority=(string 'false')`| (changed)| `"false"` |
3369+
| `fetchPriority=(string 'on')`| (changed)| `"on"` |
3370+
| `fetchPriority=(string 'off')`| (changed)| `"off"` |
3371+
| `fetchPriority=(symbol)`| (initial, warning)| `<empty string>` |
3372+
| `fetchPriority=(function)`| (initial, warning)| `<empty string>` |
3373+
| `fetchPriority=(null)`| (initial)| `<empty string>` |
3374+
| `fetchPriority=(undefined)`| (initial)| `<empty string>` |
3375+
3376+
## `fetchPriority` (on `<link>` inside `<div>`)
3377+
| Test Case | Flags | Result |
3378+
| --- | --- | --- |
3379+
| `fetchPriority=(string)`| (changed)| `"a string"` |
3380+
| `fetchPriority=(empty string)`| (initial)| `<empty string>` |
3381+
| `fetchPriority=(array with string)`| (changed)| `"string"` |
3382+
| `fetchPriority=(empty array)`| (initial)| `<empty string>` |
3383+
| `fetchPriority=(object)`| (changed)| `"result of toString()"` |
3384+
| `fetchPriority=(numeric string)`| (changed)| `"42"` |
3385+
| `fetchPriority=(-1)`| (changed)| `"-1"` |
3386+
| `fetchPriority=(0)`| (changed)| `"0"` |
3387+
| `fetchPriority=(integer)`| (changed)| `"1"` |
3388+
| `fetchPriority=(NaN)`| (changed, warning)| `"NaN"` |
3389+
| `fetchPriority=(float)`| (changed)| `"99.99"` |
3390+
| `fetchPriority=(true)`| (initial, warning)| `<empty string>` |
3391+
| `fetchPriority=(false)`| (initial, warning)| `<empty string>` |
3392+
| `fetchPriority=(string 'true')`| (changed)| `"true"` |
3393+
| `fetchPriority=(string 'false')`| (changed)| `"false"` |
3394+
| `fetchPriority=(string 'on')`| (changed)| `"on"` |
3395+
| `fetchPriority=(string 'off')`| (changed)| `"off"` |
3396+
| `fetchPriority=(symbol)`| (initial, warning)| `<empty string>` |
3397+
| `fetchPriority=(function)`| (initial, warning)| `<empty string>` |
3398+
| `fetchPriority=(null)`| (initial)| `<empty string>` |
3399+
| `fetchPriority=(undefined)`| (initial)| `<empty string>` |
3400+
33513401
## `fill` (on `<path>` inside `<svg>`)
33523402
| Test Case | Flags | Result |
33533403
| --- | --- | --- |

fixtures/attribute-behavior/src/attributes.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,9 @@ const attributes = [
573573
tagName: 'path',
574574
read: getSVGAttribute('externalResourcesRequired'),
575575
},
576+
{name: 'fetchPriority', tagName: 'img'},
577+
{name: 'fetchpriority', tagName: 'img'},
578+
{name: 'fetchPriority', tagName: 'link', read: getProperty('fetchPriority')},
576579
{
577580
name: 'fill',
578581
containerTagName: 'svg',

packages/react-dom-bindings/src/shared/possibleStandardNames.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const possibleStandardNames = {
6060
draggable: 'draggable',
6161
enctype: 'encType',
6262
enterkeyhint: 'enterKeyHint',
63+
fetchpriority: 'fetchPriority',
6364
for: 'htmlFor',
6465
form: 'form',
6566
formmethod: 'formMethod',

0 commit comments

Comments
 (0)