@@ -11703,37 +11703,37 @@ describe('$compile', function() {
11703
11703
// All interpolations are disallowed.
11704
11704
$rootScope . onClickJs = '' ;
11705
11705
expect ( function ( ) {
11706
- $compile ( '<button onclick="{{onClickJs}}"></script >' ) ;
11706
+ $compile ( '<button onclick="{{onClickJs}}"></button >' ) ;
11707
11707
} ) . toThrowMinErr (
11708
11708
'$compile' , 'nodomevents' , 'Interpolations for HTML DOM event attributes are disallowed' ) ;
11709
11709
expect ( function ( ) {
11710
- $compile ( '<button ONCLICK="{{onClickJs}}"></script >' ) ;
11710
+ $compile ( '<button ONCLICK="{{onClickJs}}"></button >' ) ;
11711
11711
} ) . toThrowMinErr (
11712
11712
'$compile' , 'nodomevents' , 'Interpolations for HTML DOM event attributes are disallowed' ) ;
11713
11713
expect ( function ( ) {
11714
- $compile ( '<button ng-attr-onclick="{{onClickJs}}"></script >' ) ;
11714
+ $compile ( '<button ng-attr-onclick="{{onClickJs}}"></button >' ) ;
11715
11715
} ) . toThrowMinErr (
11716
11716
'$compile' , 'nodomevents' , 'Interpolations for HTML DOM event attributes are disallowed' ) ;
11717
11717
expect ( function ( ) {
11718
- $compile ( '<button ng-attr-ONCLICK="{{onClickJs}}"></script >' ) ;
11718
+ $compile ( '<button ng-attr-ONCLICK="{{onClickJs}}"></button >' ) ;
11719
11719
} ) . toThrowMinErr (
11720
11720
'$compile' , 'nodomevents' , 'Interpolations for HTML DOM event attributes are disallowed' ) ;
11721
11721
} ) ) ;
11722
11722
11723
11723
it ( 'should pass through arbitrary values on onXYZ event attributes that contain a hyphen' , inject ( function ( $compile , $rootScope ) {
11724
- element = $compile ( '<button on-click="{{onClickJs}}"></script >' ) ( $rootScope ) ;
11724
+ element = $compile ( '<button on-click="{{onClickJs}}"></button >' ) ( $rootScope ) ;
11725
11725
$rootScope . onClickJs = 'javascript:doSomething()' ;
11726
11726
$rootScope . $apply ( ) ;
11727
11727
expect ( element . attr ( 'on-click' ) ) . toEqual ( 'javascript:doSomething()' ) ;
11728
11728
} ) ) ;
11729
11729
11730
11730
it ( 'should pass through arbitrary values on "on" and "data-on" attributes' , inject ( function ( $compile , $rootScope ) {
11731
- element = $compile ( '<button data-on="{{dataOnVar}}"></script >' ) ( $rootScope ) ;
11731
+ element = $compile ( '<button data-on="{{dataOnVar}}"></button >' ) ( $rootScope ) ;
11732
11732
$rootScope . dataOnVar = 'data-on text' ;
11733
11733
$rootScope . $apply ( ) ;
11734
11734
expect ( element . attr ( 'data-on' ) ) . toEqual ( 'data-on text' ) ;
11735
11735
11736
- element = $compile ( '<button on="{{onVar}}"></script >' ) ( $rootScope ) ;
11736
+ element = $compile ( '<button on="{{onVar}}"></button >' ) ( $rootScope ) ;
11737
11737
$rootScope . onVar = 'on text' ;
11738
11738
$rootScope . $apply ( ) ;
11739
11739
expect ( element . attr ( 'on' ) ) . toEqual ( 'on text' ) ;
0 commit comments