diff --git a/fixtures/attribute-behavior/AttributeTableSnapshot.md b/fixtures/attribute-behavior/AttributeTableSnapshot.md index 61037b69c4070..cbaadbca77699 100644 --- a/fixtures/attribute-behavior/AttributeTableSnapshot.md +++ b/fixtures/attribute-behavior/AttributeTableSnapshot.md @@ -5248,6 +5248,56 @@ | `imageRendering=(null)`| (initial)| `` | | `imageRendering=(undefined)`| (initial)| `` | +## `imageSizes` (on `` inside `
`) +| Test Case | Flags | Result | +| --- | --- | --- | +| `imageSizes=(string)`| (changed)| `"a string"` | +| `imageSizes=(empty string)`| (initial)| `` | +| `imageSizes=(array with string)`| (changed)| `"string"` | +| `imageSizes=(empty array)`| (initial)| `` | +| `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)| `` | +| `imageSizes=(false)`| (initial, warning)| `` | +| `imageSizes=(string 'true')`| (changed)| `"true"` | +| `imageSizes=(string 'false')`| (changed)| `"false"` | +| `imageSizes=(string 'on')`| (changed)| `"on"` | +| `imageSizes=(string 'off')`| (changed)| `"off"` | +| `imageSizes=(symbol)`| (initial, warning)| `` | +| `imageSizes=(function)`| (initial, warning)| `` | +| `imageSizes=(null)`| (initial)| `` | +| `imageSizes=(undefined)`| (initial)| `` | + +## `imageSrcSet` (on `` inside `
`) +| Test Case | Flags | Result | +| --- | --- | --- | +| `imageSrcSet=(string)`| (changed)| `"a string"` | +| `imageSrcSet=(empty string)`| (initial)| `` | +| `imageSrcSet=(array with string)`| (changed)| `"string"` | +| `imageSrcSet=(empty array)`| (initial)| `` | +| `imageSrcSet=(object)`| (changed)| `"result of toString()"` | +| `imageSrcSet=(numeric string)`| (changed)| `"42"` | +| `imageSrcSet=(-1)`| (changed)| `"-1"` | +| `imageSrcSet=(0)`| (changed)| `"0"` | +| `imageSrcSet=(integer)`| (changed)| `"1"` | +| `imageSrcSet=(NaN)`| (changed, warning)| `"NaN"` | +| `imageSrcSet=(float)`| (changed)| `"99.99"` | +| `imageSrcSet=(true)`| (initial, warning)| `` | +| `imageSrcSet=(false)`| (initial, warning)| `` | +| `imageSrcSet=(string 'true')`| (changed)| `"true"` | +| `imageSrcSet=(string 'false')`| (changed)| `"false"` | +| `imageSrcSet=(string 'on')`| (changed)| `"on"` | +| `imageSrcSet=(string 'off')`| (changed)| `"off"` | +| `imageSrcSet=(symbol)`| (initial, warning)| `` | +| `imageSrcSet=(function)`| (initial, warning)| `` | +| `imageSrcSet=(null)`| (initial)| `` | +| `imageSrcSet=(undefined)`| (initial)| `` | + ## `in` (on `` inside ``) | Test Case | Flags | Result | | --- | --- | --- | diff --git a/fixtures/attribute-behavior/src/attributes.js b/fixtures/attribute-behavior/src/attributes.js index d534613a89965..6fc61700d3a4e 100644 --- a/fixtures/attribute-behavior/src/attributes.js +++ b/fixtures/attribute-behavior/src/attributes.js @@ -937,6 +937,8 @@ const attributes = [ tagName: 'svg', read: getSVGAttribute('image-rendering'), }, + {name: 'imageSizes', tagName: 'link', read: getProperty('imageSizes')}, + {name: 'imageSrcSet', tagName: 'link', read: getProperty('imageSrcset')}, { name: 'in', read: getSVGAttribute('in'), diff --git a/packages/react-dom/src/shared/possibleStandardNames.js b/packages/react-dom/src/shared/possibleStandardNames.js index 06250d1036ec8..98a7e70831530 100644 --- a/packages/react-dom/src/shared/possibleStandardNames.js +++ b/packages/react-dom/src/shared/possibleStandardNames.js @@ -79,6 +79,8 @@ const possibleStandardNames = { 'http-equiv': 'httpEquiv', icon: 'icon', id: 'id', + imagesizes: 'imageSizes', + imagesrcset: 'imageSrcSet', innerhtml: 'innerHTML', inputmode: 'inputMode', integrity: 'integrity',