From 752160fd851dc03f0378a3d7ad5b6ce7759daaa1 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 05e0baaf..e447a8d7 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]; } }