From eb2ba8653cf84a116814869f0fcd591916951a3d Mon Sep 17 00:00:00 2001 From: "Julien Carion (juca)" Date: Mon, 25 Sep 2023 11:24:38 +0200 Subject: [PATCH] [IMP] devtools: add svg elements detection This commit extends the detection of component related dom elements to svg elements in the page so that they can be searched and highlighted correctly with the devtools. --- tools/devtools/src/page_scripts/owl_devtools_global_hook.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/devtools/src/page_scripts/owl_devtools_global_hook.js b/tools/devtools/src/page_scripts/owl_devtools_global_hook.js index 05e0baaf1..e447a8d7e 100644 --- a/tools/devtools/src/page_scripts/owl_devtools_global_hook.js +++ b/tools/devtools/src/page_scripts/owl_devtools_global_hook.js @@ -1396,7 +1396,7 @@ return this.getDOMElementsRecursive(node.content); } if (node.hasOwnProperty("el")) { - if (node.el instanceof HTMLElement || node.el instanceof Text) { + if (node.el instanceof Element || node.el instanceof Text) { return [node.el]; } } @@ -1415,7 +1415,7 @@ } } if (node.hasOwnProperty("parentEl")) { - if (node.parentEl instanceof HTMLElement) { + if (node.parentEl instanceof Element) { return [node.parentEl]; } }