Skip to content

Commit

Permalink
Fix injected script's Shadow DOM parsing
Browse files Browse the repository at this point in the history
Fixes the _exploreShadowDOM function defined in the
js/injected_script.js to check for root's children before recursively
exploring them.
  • Loading branch information
ka3de committed Sep 26, 2023
1 parent 5c56565 commit 1bd917f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/js/injected_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ class InjectedScript {
);
result = result.concat(shadowRootResults);
}

if (root.children === undefined) return result;

for (let i = 0; i < root.children.length; i++) {
const childElement = root.children[i];
Expand Down

0 comments on commit 1bd917f

Please sign in to comment.