MCPcopy Index your code
hub / github.com/WebReflection/wicked-elements / loop

Function loop

index.js:42–62  ·  view source on GitHub ↗
(nodes, added, removed, connected, pass)

Source from the content-addressed store, hash-verified

40
41 var notify = function notify(callback, root, MO) {
42 var loop = function loop(nodes, added, removed, connected, pass) {
43 for (var i = 0, length = nodes.length; i < length; i++) {
44 var node = nodes[i];
45
46 if (pass || QSA$1 in node) {
47 if (connected) {
48 if (!added.has(node)) {
49 added.add(node);
50 removed["delete"](node);
51 callback(node, connected);
52 }
53 } else if (!removed.has(node)) {
54 removed.add(node);
55 added["delete"](node);
56 callback(node, connected);
57 }
58
59 if (!pass) loop(node[QSA$1]('*'), added, removed, connected, TRUE);
60 }
61 }
62 };
63
64 var observer = new (MO || MutationObserver)(function (records) {
65 for (var added = new Set(), removed = new Set(), i = 0, length = records.length; i < length; i++) {

Callers 1

notifyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected