MCPcopy Create free account
hub / github.com/cafebazaar/blacksmith / getTrustedContext

Function getTrustedContext

web/static/bower_components/angular/angular.js:8611–8623  ·  view source on GitHub ↗
(node, attrNormalizedName)

Source from the content-addressed store, hash-verified

8609
8610
8611 function getTrustedContext(node, attrNormalizedName) {
8612 if (attrNormalizedName == "srcdoc") {
8613 return $sce.HTML;
8614 }
8615 var tag = nodeName_(node);
8616 // maction[xlink:href] can source SVG. It's not limited to <maction>.
8617 if (attrNormalizedName == "xlinkHref" ||
8618 (tag == "form" && attrNormalizedName == "action") ||
8619 (tag != "img" && (attrNormalizedName == "src" ||
8620 attrNormalizedName == "ngSrc"))) {
8621 return $sce.RESOURCE_URL;
8622 }
8623 }
8624
8625
8626 function addAttrInterpolateDirective(node, directives, value, name, allOrNothing) {

Callers 1

Calls 1

nodeName_Function · 0.85

Tested by

no test coverage detected