Skip to content

Commit

Permalink
Version 0.5.3c
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwelld90 committed Apr 20, 2021
1 parent 0c99264 commit cecb38b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "logui",
"version": "0.5.3b",
"version": "0.5.3c",
"description": "A framework-agnostic client-side JavaScript library for logging user interactions on webpages.",
"main": "./src/main.js",
"scripts": {
Expand Down
13 changes: 13 additions & 0 deletions src/modules/DOMHandler/mutationObserverController.js
Expand Up @@ -41,12 +41,25 @@ export default (function(root) {
for (let element of record.addedNodes) {
if (element.nodeType == 1) {
processAddedElement(element);

// There may be child elements that need to be processed, too.
// The recurive function processDescendants handles this.
processDescendants(element);
}
}
}
}
};

var processDescendants = function(element) {
let childArray = Array.from(element.children);

childArray.forEach((childElement) => {
processAddedElement(childElement);
processDescendants(childElement);
});
};

var processAddedElement = function(element) {
let shallBind = false;

Expand Down

0 comments on commit cecb38b

Please sign in to comment.