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
vmx906 committed
Apr 21, 2026 at 10:33 UTC
94643c3b8516928e4cc7fad99912272670a0a990
2 files changed
+11
packages/react-dom-bindings/src/shared/possibleStandardNames.js
+1
@@ -44,6 +44,7 @@ const possibleStandardNames = {
44
controls: 'controls',
45
controlslist: 'controlsList',
46
coords: 'coords',
47
+ credentialless: 'credentialless',
48
crossorigin: 'crossOrigin',
49
dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
50
data: 'data',
packages/react-dom/src/__tests__/ReactDOMComponent-test.js
+10
@@ -2678,6 +2678,16 @@ describe('ReactDOMComponent', () => {
2678
]);
2679
});
2680
2681
+ it('should warn about incorrect casing on the credentialless property (ssr)', () => {
2682
+ ReactDOMServer.renderToString(
2683
+ React.createElement('iframe', {Credentialless: true}),
2684
+ );
2685
+ assertConsoleErrorDev([
2686
+ 'Invalid DOM property `Credentialless`. Did you mean `credentialless`?\n' +
2687
+ ' in iframe (at **)',
2688
+ ]);
2689
+ });
2690
+
2691
it('should warn about incorrect casing on event handlers (ssr)', () => {
2692
ReactDOMServer.renderToString(
2693
React.createElement('input', {type: 'text', oninput: '1'}),