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

Function collectCommentDirectives

lib/test/angular/1.6.7/angular.js:9406–9422  ·  view source on GitHub ↗
(node, directives, attrs, maxPriority, ignoreDirective)

Source from the content-addressed store, hash-verified

9404 }
9405
9406 function collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective) {
9407 // function created because of performance, try/catch disables
9408 // the optimization of the whole function #14848
9409 try {
9410 var match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);
9411 if (match) {
9412 var nName = directiveNormalize(match[1]);
9413 if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {
9414 attrs[nName] = trim(match[2]);
9415 }
9416 }
9417 } catch (e) {
9418 // turns out that under some circumstances IE9 throws errors when one attempts to read
9419 // comment's node value.
9420 // Just ignore it and continue. (Can't seem to reproduce in test case.)
9421 }
9422 }
9423
9424 /**
9425 * 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