(node, attrNormalizedName)
| 9975 | |
| 9976 | |
| 9977 | function getTrustedContext(node, attrNormalizedName) { |
| 9978 | if (attrNormalizedName === 'srcdoc') { |
| 9979 | return $sce.HTML; |
| 9980 | } |
| 9981 | var tag = nodeName_(node); |
| 9982 | // All tags with src attributes require a RESOURCE_URL value, except for |
| 9983 | // img and various html5 media tags. |
| 9984 | if (attrNormalizedName === 'src' || attrNormalizedName === 'ngSrc') { |
| 9985 | if (['img', 'video', 'audio', 'source', 'track'].indexOf(tag) === -1) { |
| 9986 | return $sce.RESOURCE_URL; |
| 9987 | } |
| 9988 | // maction[xlink:href] can source SVG. It's not limited to <maction>. |
| 9989 | } else if (attrNormalizedName === 'xlinkHref' || |
| 9990 | (tag === 'form' && attrNormalizedName === 'action') |
| 9991 | ) { |
| 9992 | return $sce.RESOURCE_URL; |
| 9993 | } |
| 9994 | } |
| 9995 | |
| 9996 | |
| 9997 | function addAttrInterpolateDirective(node, directives, value, name, isNgAttr) { |
no test coverage detected