LibWebView: Use querySelectorAll to find hoverable tree nodes

We don't need a live HTMLCollection here, so let's use querySelectorAll
to instead iterate over a static NodeList.
This commit is contained in:
Timothy Flynn 2023-11-30 07:15:34 -05:00 committed by Andreas Kling
parent 030b90b79d
commit a7ff65a0c6
Notes: sideshowbarker 2024-07-18 08:59:31 +09:00

View File

@ -53,7 +53,7 @@ inspector.loadDOMTree = tree => {
let domTree = document.getElementById("dom-tree");
domTree.innerHTML = atob(tree);
let domNodes = domTree.getElementsByClassName("hoverable");
let domNodes = domTree.querySelectorAll(".hoverable");
for (let domNode of domNodes) {
domNode.addEventListener("click", event => {