@@ -8,7 +8,7 @@ import Expression from '../../../nodes/shared/Expression';
8
8
import Text from '../../../nodes/Text' ;
9
9
import handle_select_value_binding from './handle_select_value_binding' ;
10
10
import { Identifier , Node } from 'estree' ;
11
- import { namespaces , valid_namespaces } from '../../../../utils/namespaces' ;
11
+ import { valid_namespaces } from '../../../../utils/namespaces' ;
12
12
13
13
export class BaseAttributeWrapper {
14
14
node : Attribute ;
@@ -68,13 +68,13 @@ export default class AttributeWrapper extends BaseAttributeWrapper {
68
68
}
69
69
70
70
const namespace = this . parent . node . namespace ;
71
- // some processing only applies to html namespace (and not MathML, SVG, or Svelte Native etc)
72
- if ( namespace && namespace != 'html' && namespace != namespaces . html ) {
73
- // attributes outside of the html namespace may be case sensitive
74
- // namespaces for which we don't have case corrections, are left in their original case (required for svelte-native)
75
- this . name = ( valid_namespaces . indexOf ( namespace ) >= 0 ) ? fix_attribute_casing ( this . node . name ) : this . node . name ;
71
+
72
+ // some processing only applies to known namespaces
73
+ if ( namespace && ! valid_namespaces . includes ( namespace ) ) {
74
+ // attributes outside of the valid namespace may be case sensitive (eg svelte native). We leave them in their current case
75
+ this . name = this . node . name ;
76
+ this . metadata = this . get_metadata ( ) ;
76
77
this . is_indirectly_bound_value = false ;
77
- this . metadata = null ;
78
78
this . property_name = null ;
79
79
this . is_select_value_attribute = false ;
80
80
this . is_input_value = false ;
@@ -92,7 +92,6 @@ export default class AttributeWrapper extends BaseAttributeWrapper {
92
92
93
93
this . is_src = this . name === 'src' ; // TODO retire this exception in favour of https://github.com/sveltejs/svelte/issues/3750
94
94
this . should_cache = should_cache ( this ) ;
95
-
96
95
}
97
96
98
97
render ( block : Block ) {
0 commit comments