Skip to content

Commit 08dc781

Browse files
committed
feat(react-dom): Add imageSizes
1 parent 6305ad1 commit 08dc781

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

fixtures/attribute-behavior/AttributeTableSnapshot.md

+25
Original file line numberDiff line numberDiff line change
@@ -5248,6 +5248,31 @@
52485248
| `imageRendering=(null)`| (initial)| `<null>` |
52495249
| `imageRendering=(undefined)`| (initial)| `<null>` |
52505250

5251+
## `imageSizes` (on `<link>` inside `<div>`)
5252+
| Test Case | Flags | Result |
5253+
| --- | --- | --- |
5254+
| `imageSizes=(string)`| (changed)| `"a string"` |
5255+
| `imageSizes=(empty string)`| (initial)| `<empty string>` |
5256+
| `imageSizes=(array with string)`| (changed)| `"string"` |
5257+
| `imageSizes=(empty array)`| (initial)| `<empty string>` |
5258+
| `imageSizes=(object)`| (changed)| `"result of toString()"` |
5259+
| `imageSizes=(numeric string)`| (changed)| `"42"` |
5260+
| `imageSizes=(-1)`| (changed)| `"-1"` |
5261+
| `imageSizes=(0)`| (changed)| `"0"` |
5262+
| `imageSizes=(integer)`| (changed)| `"1"` |
5263+
| `imageSizes=(NaN)`| (changed, warning)| `"NaN"` |
5264+
| `imageSizes=(float)`| (changed)| `"99.99"` |
5265+
| `imageSizes=(true)`| (initial, warning)| `<empty string>` |
5266+
| `imageSizes=(false)`| (initial, warning)| `<empty string>` |
5267+
| `imageSizes=(string 'true')`| (changed)| `"true"` |
5268+
| `imageSizes=(string 'false')`| (changed)| `"false"` |
5269+
| `imageSizes=(string 'on')`| (changed)| `"on"` |
5270+
| `imageSizes=(string 'off')`| (changed)| `"off"` |
5271+
| `imageSizes=(symbol)`| (initial, warning)| `<empty string>` |
5272+
| `imageSizes=(function)`| (initial, warning)| `<empty string>` |
5273+
| `imageSizes=(null)`| (initial)| `<empty string>` |
5274+
| `imageSizes=(undefined)`| (initial)| `<empty string>` |
5275+
52515276
## `imageSrcSet` (on `<link>` inside `<div>`)
52525277
| Test Case | Flags | Result |
52535278
| --- | --- | --- |

fixtures/attribute-behavior/src/attributes.js

+1
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,7 @@ const attributes = [
937937
tagName: 'svg',
938938
read: getSVGAttribute('image-rendering'),
939939
},
940+
{name: 'imageSizes', tagName: 'link', read: getProperty('imageSizes')},
940941
{name: 'imageSrcSet', tagName: 'link', read: getProperty('imageSrcset')},
941942
{
942943
name: 'in',

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

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ const possibleStandardNames = {
7979
'http-equiv': 'httpEquiv',
8080
icon: 'icon',
8181
id: 'id',
82+
imagesizes: 'imageSizes',
8283
imagesrcset: 'imageSrcSet',
8384
innerhtml: 'innerHTML',
8485
inputmode: 'inputMode',

0 commit comments

Comments
 (0)