Skip to content

Commit 752160f

Browse files
juliusc2066ged-odoo
authored andcommitted
[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.
1 parent 3937966 commit 752160f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/devtools/src/page_scripts/owl_devtools_global_hook.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,7 @@
13961396
return this.getDOMElementsRecursive(node.content);
13971397
}
13981398
if (node.hasOwnProperty("el")) {
1399-
if (node.el instanceof HTMLElement || node.el instanceof Text) {
1399+
if (node.el instanceof Element || node.el instanceof Text) {
14001400
return [node.el];
14011401
}
14021402
}
@@ -1415,7 +1415,7 @@
14151415
}
14161416
}
14171417
if (node.hasOwnProperty("parentEl")) {
1418-
if (node.parentEl instanceof HTMLElement) {
1418+
if (node.parentEl instanceof Element) {
14191419
return [node.parentEl];
14201420
}
14211421
}

0 commit comments

Comments
 (0)