@@ -363,16 +363,24 @@ const REACT_ON_PROPS = [
363
363
] ;
364
364
365
365
function getDOMPropertyNames ( context ) {
366
- const ALL_DOM_PROPERTY_NAMES = DOM_PROPERTY_NAMES_TWO_WORDS . concat ( DOM_PROPERTY_NAMES_ONE_WORD ) ;
367
- // this was removed in React v16.1+, see https://github.com/facebook/react/pull/10823
368
- if ( ! testReactVersion ( context , '>= 16.1.0' ) ) {
369
- return ALL_DOM_PROPERTY_NAMES . concat ( 'allowTransparency' ) ;
370
- }
371
- // these were added in React v16.4.0, see https://reactjs.org/blog/2018/05/23/react-v-16-4.html and https://github.com/facebook/react/pull/12507
372
- if ( testReactVersion ( context , '>= 16.4.0' ) ) {
373
- return ALL_DOM_PROPERTY_NAMES . concat ( REACT_ON_PROPS ) ;
374
- }
375
- return ALL_DOM_PROPERTY_NAMES ;
366
+ return [ ] . concat (
367
+ DOM_PROPERTY_NAMES_TWO_WORDS ,
368
+ DOM_PROPERTY_NAMES_ONE_WORD ,
369
+
370
+ testReactVersion ( context , '>= 16.1.0' ) ? [ ] . concat (
371
+ testReactVersion ( context , '>= 16.4.0' ) ? [ ] . concat (
372
+ // these were added in React v16.4.0, see https://reactjs.org/blog/2018/05/23/react-v-16-4.html and https://github.com/facebook/react/pull/12507
373
+ REACT_ON_PROPS ,
374
+ testReactVersion ( context , '>= 19' ) ? [
375
+ // precedence was added in React v19, see https://react.dev/blog/2024/04/25/react-19#support-for-stylesheets
376
+ 'precedence' ,
377
+ ] : [ ]
378
+ ) : [ ]
379
+ ) : [
380
+ // this was removed in React v16.1+, see https://github.com/facebook/react/pull/10823
381
+ 'allowTransparency' ,
382
+ ]
383
+ ) ;
376
384
}
377
385
378
386
// ------------------------------------------------------------------------------
@@ -501,6 +509,7 @@ function getStandardName(name, context) {
501
509
return SVGDOM_ATTRIBUTE_NAMES [ /** @type {keyof SVGDOM_ATTRIBUTE_NAMES } */ ( name ) ] ;
502
510
}
503
511
const names = getDOMPropertyNames ( context ) ;
512
+
504
513
// Let's find a possible attribute match with a case-insensitive search.
505
514
return names . find ( ( element ) => element . toLowerCase ( ) === name . toLowerCase ( ) ) ;
506
515
}
0 commit comments