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

Function collectCommentDirectives

lib/test/angular/1.7.0/angular.js:9516–9532  ·  view source on GitHub ↗
(node, directives, attrs, maxPriority, ignoreDirective)

Source from the content-addressed store, hash-verified

9514 }
9515
9516 function collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective) {
9517 // function created because of performance, try/catch disables
9518 // the optimization of the whole function #14848
9519 try {
9520 var match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);
9521 if (match) {
9522 var nName = directiveNormalize(match[1]);
9523 if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {
9524 attrs[nName] = trim(match[2]);
9525 }
9526 }
9527 } catch (e) {
9528 // turns out that under some circumstances IE9 throws errors when one attempts to read
9529 // comment's node value.
9530 // Just ignore it and continue. (Can't seem to reproduce in test case.)
9531 }
9532 }
9533
9534 /**
9535 * 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