[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.
This commit is contained in:
Julien Carion (juca)
2023-09-25 11:24:38 +02:00
committed by Géry Debongnie
parent 3937966b74
commit 752160fd85
@@ -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];
}
}