Suggest correct casing for misspelled credentialless iframe attribute (#36322)

## Summary

Follow-up to #36148 (which added credentialless as a recognized boolean
attribute for iframes). Adds credentialless to possibleStandardNames so
React's dev warning can suggest the correct casing when users write it
as Credentialless (or another incorrect case). Includes an SSR test
asserting the "Did you mean credentialless?" warning fires.

 ## Test plan

- yarn test ReactDOMComponent passes, including the new should warn
about incorrect casing on the credentialless property (ssr) case
This commit is contained in:
vmx906
2026-04-21 10:33:45 +01:00
committed by GitHub
parent e0bf6debfa
commit f8ca46a1fd
2 changed files with 11 additions and 0 deletions
@@ -44,6 +44,7 @@ const possibleStandardNames = {
controls: 'controls',
controlslist: 'controlsList',
coords: 'coords',
credentialless: 'credentialless',
crossorigin: 'crossOrigin',
dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
data: 'data',
@@ -2678,6 +2678,16 @@ describe('ReactDOMComponent', () => {
]);
});
it('should warn about incorrect casing on the credentialless property (ssr)', () => {
ReactDOMServer.renderToString(
React.createElement('iframe', {Credentialless: true}),
);
assertConsoleErrorDev([
'Invalid DOM property `Credentialless`. Did you mean `credentialless`?\n' +
' in iframe (at **)',
]);
});
it('should warn about incorrect casing on event handlers (ssr)', () => {
ReactDOMServer.renderToString(
React.createElement('input', {type: 'text', oninput: '1'}),