@@ -3424,11 +3424,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
3424
3424
}
3425
3425
3426
3426
3427
- function getTrustedAttrContext ( node , attrNormalizedName ) {
3427
+ function getTrustedAttrContext ( tag , attrNormalizedName ) {
3428
3428
if ( attrNormalizedName === 'srcdoc' ) {
3429
3429
return $sce . HTML ;
3430
3430
}
3431
- var tag = nodeName_ ( node ) ;
3432
3431
// All tags with src attributes require a RESOURCE_URL value, except for
3433
3432
// img and various html5 media tags, which require the MEDIA_URL context.
3434
3433
if ( attrNormalizedName === 'src' || attrNormalizedName === 'ngSrc' ) {
@@ -3457,8 +3456,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
3457
3456
}
3458
3457
}
3459
3458
3460
- function getTrustedPropContext ( node , propNormalizedName ) {
3461
- var tag = nodeName_ ( node ) ;
3459
+ function getTrustedPropContext ( tag , propNormalizedName ) {
3462
3460
var prop = propNormalizedName . toLowerCase ( ) ;
3463
3461
return PROP_CONTEXTS [ tag + "|" + prop ] || PROP_CONTEXTS [ "*|" + prop ] ;
3464
3462
}
@@ -3471,7 +3469,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
3471
3469
}
3472
3470
3473
3471
var nodeName = nodeName_ ( node ) ;
3474
- var trustedContext = getTrustedPropContext ( node , propName ) ;
3472
+ var trustedContext = getTrustedPropContext ( nodeName , propName ) ;
3475
3473
3476
3474
directives . push ( {
3477
3475
priority : 100 ,
@@ -3504,7 +3502,8 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
3504
3502
}
3505
3503
3506
3504
function addAttrInterpolateDirective ( node , directives , value , name , isNgAttr ) {
3507
- var trustedContext = getTrustedAttrContext ( node , name ) ;
3505
+ var tag = nodeName_ ( node ) ;
3506
+ var trustedContext = getTrustedAttrContext ( tag , name ) ;
3508
3507
var mustHaveExpression = ! isNgAttr ;
3509
3508
var allOrNothing = ALL_OR_NOTHING_ATTRS [ name ] || isNgAttr ;
3510
3509
@@ -3513,7 +3512,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
3513
3512
// no interpolation found -> ignore
3514
3513
if ( ! interpolateFn ) return ;
3515
3514
3516
- if ( name === 'multiple' && nodeName_ ( node ) === 'select' ) {
3515
+ if ( name === 'multiple' && tag === 'select' ) {
3517
3516
throw $compileMinErr ( 'selmulti' ,
3518
3517
'Binding to the \'multiple\' attribute is not supported. Element: {0}' ,
3519
3518
startingTag ( node ) ) ;
0 commit comments