@@ -363,16 +363,24 @@ const REACT_ON_PROPS = [
363363] ;
364364
365365function 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+ ) ;
376384}
377385
378386// ------------------------------------------------------------------------------
@@ -501,6 +509,7 @@ function getStandardName(name, context) {
501509 return SVGDOM_ATTRIBUTE_NAMES [ /** @type {keyof SVGDOM_ATTRIBUTE_NAMES } */ ( name ) ] ;
502510 }
503511 const names = getDOMPropertyNames ( context ) ;
512+
504513 // Let's find a possible attribute match with a case-insensitive search.
505514 return names . find ( ( element ) => element . toLowerCase ( ) === name . toLowerCase ( ) ) ;
506515}
0 commit comments