Get target element id of a page in same domain in iframe during inspect
Opened this issue · 2 comments
sudheej commented
@luoye-fe Thanks for this wonderful module, I am trying to get element details of inspected id's inside an iframe, as of version 1.2.3 inspector is working fine inside the iframe, how do I identify the element details as I hover over them in the iframe.
this is what I have
document.getElementById("iframe").onload = () => {
const inspector = new DomInspector({
// get iframe element by `contentWindow`
root: document.getElementById("iframe").contentWindow.document.querySelector('body'),
//exclude: ['#exclude>iframe', document.querySelector('.exclude')],
maxZIndex: 99
});
inspector.enable();
}
luoye-fe commented
Thank you for using this moudle.
Bind mouseover
or click
event on element, then when the event is triggered, get element details from inspector.target
. Or direct use event.currentTarget
& event.target
gain the element.
luoye-fe commented
ping?