Commit 7143765
committed
Add credentialless as a recognized boolean attribute for iframes (#36148)
## Summary
The `credentialless` attribute is a boolean HTML attribute for
`<iframe>` elements that loads the iframe in a new, ephemeral context
without access to the parent's credentials (cookies, client
certificates, etc.). This change adds it to all boolean attribute
switch/case lists in React DOM so it is properly handled as a boolean
(set when true, removed when false) rather than being treated as an
unknown string attribute.
Per the [Anonymous iframe spec
(WICG)](https://wicg.github.io/anonymous-iframe/):
> The credentialless attribute enables loading documents hosted by the
iframe with a new and ephemeral storage partition. It is a boolean
value. The default is false.
```
partial interface HTMLIFrameElement {
attribute boolean credentialless;
};
```
Changes:
- ReactDOMComponent.js: Added to both `setProp` and
`diffHydratedGenericElement`
- ReactFizzConfigDOM.js: Added to `pushAttribute` for server-side
rendering
- ReactDOMUnknownPropertyHook.js: Added to both validation switch/case
lists
## Test plan
- Added unit test in DOMPropertyOperations-test.js verifying
`credentialless={true}` sets the attribute to `''` and
`credentialless={false}` removes it
- All tests pass in source and www channels (590 tests each)
- Flow type checking passes (dom-node renderer)
- Prettier and lint pass
DiffTrain build for [306a01b](306a01b)1 parent 03117b3 commit 7143765
36 files changed
Lines changed: 120 additions & 86 deletions
File tree
- compiled/facebook-www
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1482 | 1482 | | |
1483 | 1483 | | |
1484 | 1484 | | |
1485 | | - | |
| 1485 | + | |
1486 | 1486 | | |
1487 | 1487 | | |
1488 | 1488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1482 | 1482 | | |
1483 | 1483 | | |
1484 | 1484 | | |
1485 | | - | |
| 1485 | + | |
1486 | 1486 | | |
1487 | 1487 | | |
1488 | 1488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
613 | | - | |
| 613 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
613 | | - | |
| 613 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
| 617 | + | |
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
| 617 | + | |
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20434 | 20434 | | |
20435 | 20435 | | |
20436 | 20436 | | |
20437 | | - | |
| 20437 | + | |
20438 | 20438 | | |
20439 | 20439 | | |
20440 | | - | |
| 20440 | + | |
20441 | 20441 | | |
20442 | 20442 | | |
20443 | 20443 | | |
| |||
20472 | 20472 | | |
20473 | 20473 | | |
20474 | 20474 | | |
20475 | | - | |
| 20475 | + | |
20476 | 20476 | | |
20477 | 20477 | | |
20478 | 20478 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20205 | 20205 | | |
20206 | 20206 | | |
20207 | 20207 | | |
20208 | | - | |
| 20208 | + | |
20209 | 20209 | | |
20210 | 20210 | | |
20211 | | - | |
| 20211 | + | |
20212 | 20212 | | |
20213 | 20213 | | |
20214 | 20214 | | |
| |||
20243 | 20243 | | |
20244 | 20244 | | |
20245 | 20245 | | |
20246 | | - | |
| 20246 | + | |
20247 | 20247 | | |
20248 | 20248 | | |
20249 | 20249 | | |
| |||
0 commit comments