@@ -113,7 +113,10 @@ export class BaseCustomWebComponentNoAttachedTemplate extends HTMLElement {
113113 if ( a . name == "@touch:contextmenu" )
114114 addTouchFriendlyContextMenu ( node , this [ a . value ] . bind ( this ) ) ;
115115 else {
116- const sNm = a . name . substr ( 1 ) ;
116+ let sNm = a . name . substr ( 1 ) ;
117+ if ( sNm [ 0 ] === '@' ) {
118+ sNm = sNm . replace ( / - ( [ a - z ] ) / g, ( g ) => g [ 1 ] . toUpperCase ( ) ) ;
119+ }
117120 let nm = sNm . replace ( / - ( [ a - z ] ) / g, ( g ) => g [ 1 ] . toUpperCase ( ) ) ;
118121 if ( node [ nm ] instanceof TypedEvent ) {
119122 ( < TypedEvent < any > > node [ nm ] ) . on ( this [ a . value ] . bind ( this ) ) ;
@@ -222,9 +225,9 @@ export class BaseCustomWebComponentNoAttachedTemplate extends HTMLElement {
222225 } else if ( a . name [ 0 ] === '@' ) { //todo remove events on repeat refresh
223226 let nm ;
224227 if ( a . name [ 1 ] === '@' )
225- nm = a . name . substring ( 2 , a . name . length ) ;
228+ nm = a . name . substring ( 2 , a . name . length ) . replace ( / - ( [ a - z ] ) / g , ( g ) => g [ 1 ] . toUpperCase ( ) ) ;
226229 else
227- nm = a . name . substring ( 1 , a . name . length ) . replace ( / - ( [ a - z ] ) / g , ( g ) => g [ 1 ] . toUpperCase ( ) ) ;
230+ nm = a . name . substring ( 1 , a . name . length ) ;
228231 const value = a . value . substring ( 2 , a . value . length - 2 ) . replaceAll ( '&' , '&' ) ;
229232 if ( a . name == "@touch:contextmenu" )
230233 addTouchFriendlyContextMenu ( node , ( e ) => this . _bindingRunEval ( value , repeatBindingItems , e , host , context ) ) ;
0 commit comments