MCPcopy Index your code
hub / github.com/angular-ui/ui-router / collectCommentDirectives

Function collectCommentDirectives

test/angular/1.7/angular.js:10024–10040  ·  view source on GitHub ↗
(node, directives, attrs, maxPriority, ignoreDirective)

Source from the content-addressed store, hash-verified

10022 }
10023
10024 function collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective) {
10025 // function created because of performance, try/catch disables
10026 // the optimization of the whole function #14848
10027 try {
10028 var match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);
10029 if (match) {
10030 var nName = directiveNormalize(match[1]);
10031 if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {
10032 attrs[nName] = trim(match[2]);
10033 }
10034 }
10035 } catch (e) {
10036 // turns out that under some circumstances IE9 throws errors when one attempts to read
10037 // comment's node value.
10038 // Just ignore it and continue. (Can't seem to reproduce in test case.)
10039 }
10040 }
10041
10042 /**
10043 * Given a node with a directive-start it collects all of the siblings until it finds

Callers 1

collectDirectivesFunction · 0.70

Calls 3

directiveNormalizeFunction · 0.70
addDirectiveFunction · 0.70
trimFunction · 0.70

Tested by

no test coverage detected