Skip to content

Commit

Permalink
[IMP] devtools: add svg elements detection
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
juliusc2066 authored and ged-odoo committed Sep 25, 2023
1 parent 3937966 commit 752160f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/devtools/src/page_scripts/owl_devtools_global_hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
}
Expand All @@ -1415,7 +1415,7 @@
}
}
if (node.hasOwnProperty("parentEl")) {
if (node.parentEl instanceof HTMLElement) {
if (node.parentEl instanceof Element) {
return [node.parentEl];
}
}
Expand Down

0 comments on commit 752160f

Please sign in to comment.