Skip to content

Commit

Permalink
feat(react-dom): Add imageSizes
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Oct 13, 2021
1 parent 6305ad1 commit 08dc781
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
25 changes: 25 additions & 0 deletions fixtures/attribute-behavior/AttributeTableSnapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -5248,6 +5248,31 @@
| `imageRendering=(null)`| (initial)| `<null>` |
| `imageRendering=(undefined)`| (initial)| `<null>` |

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

## `imageSrcSet` (on `<link>` inside `<div>`)
| Test Case | Flags | Result |
| --- | --- | --- |
Expand Down
1 change: 1 addition & 0 deletions fixtures/attribute-behavior/src/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,7 @@ const attributes = [
tagName: 'svg',
read: getSVGAttribute('image-rendering'),
},
{name: 'imageSizes', tagName: 'link', read: getProperty('imageSizes')},
{name: 'imageSrcSet', tagName: 'link', read: getProperty('imageSrcset')},
{
name: 'in',
Expand Down
1 change: 1 addition & 0 deletions packages/react-dom/src/shared/possibleStandardNames.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const possibleStandardNames = {
'http-equiv': 'httpEquiv',
icon: 'icon',
id: 'id',
imagesizes: 'imageSizes',
imagesrcset: 'imageSrcSet',
innerhtml: 'innerHTML',
inputmode: 'inputMode',
Expand Down

0 comments on commit 08dc781

Please sign in to comment.