Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fetchPriority to <img> and <link> #25927

Merged
merged 2 commits into from
Dec 23, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions fixtures/attribute-behavior/AttributeTableSnapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -3348,6 +3348,56 @@
| `externalResourcesRequired=(null)`| (initial)| `<null>` |
| `externalResourcesRequired=(undefined)`| (initial)| `<null>` |

## `fetchPriority` (on `<img>` inside `<div>`)
| Test Case | Flags | Result |
| --- | --- | --- |
| `fetchPriority=(string)`| (changed)| `"a string"` |
| `fetchPriority=(empty string)`| (initial)| `<empty string>` |
| `fetchPriority=(array with string)`| (changed)| `"string"` |
| `fetchPriority=(empty array)`| (initial)| `<empty string>` |
| `fetchPriority=(object)`| (changed)| `"result of toString()"` |
| `fetchPriority=(numeric string)`| (changed)| `"42"` |
| `fetchPriority=(-1)`| (changed)| `"-1"` |
| `fetchPriority=(0)`| (changed)| `"0"` |
| `fetchPriority=(integer)`| (changed)| `"1"` |
| `fetchPriority=(NaN)`| (changed, warning)| `"NaN"` |
| `fetchPriority=(float)`| (changed)| `"99.99"` |
| `fetchPriority=(true)`| (initial, warning)| `<empty string>` |
| `fetchPriority=(false)`| (initial, warning)| `<empty string>` |
| `fetchPriority=(string 'true')`| (changed)| `"true"` |
| `fetchPriority=(string 'false')`| (changed)| `"false"` |
| `fetchPriority=(string 'on')`| (changed)| `"on"` |
| `fetchPriority=(string 'off')`| (changed)| `"off"` |
| `fetchPriority=(symbol)`| (initial, warning)| `<empty string>` |
| `fetchPriority=(function)`| (initial, warning)| `<empty string>` |
| `fetchPriority=(null)`| (initial)| `<empty string>` |
| `fetchPriority=(undefined)`| (initial)| `<empty string>` |

## `fetchPriority` (on `<link>` inside `<div>`)
| Test Case | Flags | Result |
| --- | --- | --- |
| `fetchPriority=(string)`| (changed)| `"a string"` |
| `fetchPriority=(empty string)`| (initial)| `<empty string>` |
| `fetchPriority=(array with string)`| (changed)| `"string"` |
| `fetchPriority=(empty array)`| (initial)| `<empty string>` |
| `fetchPriority=(object)`| (changed)| `"result of toString()"` |
| `fetchPriority=(numeric string)`| (changed)| `"42"` |
| `fetchPriority=(-1)`| (changed)| `"-1"` |
| `fetchPriority=(0)`| (changed)| `"0"` |
| `fetchPriority=(integer)`| (changed)| `"1"` |
| `fetchPriority=(NaN)`| (changed, warning)| `"NaN"` |
| `fetchPriority=(float)`| (changed)| `"99.99"` |
| `fetchPriority=(true)`| (initial, warning)| `<empty string>` |
| `fetchPriority=(false)`| (initial, warning)| `<empty string>` |
| `fetchPriority=(string 'true')`| (changed)| `"true"` |
| `fetchPriority=(string 'false')`| (changed)| `"false"` |
| `fetchPriority=(string 'on')`| (changed)| `"on"` |
| `fetchPriority=(string 'off')`| (changed)| `"off"` |
| `fetchPriority=(symbol)`| (initial, warning)| `<empty string>` |
| `fetchPriority=(function)`| (initial, warning)| `<empty string>` |
| `fetchPriority=(null)`| (initial)| `<empty string>` |
| `fetchPriority=(undefined)`| (initial)| `<empty string>` |

## `fill` (on `<path>` inside `<svg>`)
| Test Case | Flags | Result |
| --- | --- | --- |
Expand Down
3 changes: 3 additions & 0 deletions fixtures/attribute-behavior/src/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,9 @@ const attributes = [
tagName: 'path',
read: getSVGAttribute('externalResourcesRequired'),
},
{name: 'fetchPriority', tagName: 'img'},
{name: 'fetchpriority', tagName: 'img'},
eps1lon marked this conversation as resolved.
Show resolved Hide resolved
{name: 'fetchPriority', tagName: 'link', read: getProperty('fetchPriority')},
{
name: 'fill',
containerTagName: 'svg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const possibleStandardNames = {
draggable: 'draggable',
enctype: 'encType',
enterkeyhint: 'enterKeyHint',
fetchpriority: 'fetchPriority',
for: 'htmlFor',
form: 'form',
formmethod: 'formMethod',
Expand Down