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

Function mergeConsecutiveTextNodes

test/angular/1.7/angular.js:9844–9868  ·  view source on GitHub ↗
(nodeList, idx, notLiveList)

Source from the content-addressed store, hash-verified

9842 }
9843
9844 function mergeConsecutiveTextNodes(nodeList, idx, notLiveList) {
9845 var node = nodeList[idx];
9846 var parent = node.parentNode;
9847 var sibling;
9848
9849 if (node.nodeType !== NODE_TYPE_TEXT) {
9850 return;
9851 }
9852
9853 while (true) {
9854 sibling = parent ? node.nextSibling : nodeList[idx + 1];
9855 if (!sibling || sibling.nodeType !== NODE_TYPE_TEXT) {
9856 break;
9857 }
9858
9859 node.nodeValue = node.nodeValue + sibling.nodeValue;
9860
9861 if (sibling.parentNode) {
9862 sibling.parentNode.removeChild(sibling);
9863 }
9864 if (notLiveList && sibling === nodeList[idx + 1]) {
9865 nodeList.splice(idx + 1, 1);
9866 }
9867 }
9868 }
9869
9870 function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {
9871 function boundTranscludeFn(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) {

Callers 1

compileNodesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected