#Element removal
15 messages · Page 1 of 1 (latest)
How can I manage to do that tho? 
or how to listen for element creation
the page is remote tho, it's not a local html file
so?
Original code
mainWindow.webContents.executeJavaScript(`
const observer = new MutationObserver((mutations) => {
mutations.forEach((mutation) => {
if (mutation.addedNodes.length) {
mutation.addedNodes.forEach((node) => {
if (node.classList && node.classList.contains('item-link1')) {
node.remove();
}
});
}
});
});
observer.observe(document.body, {
childList: true,
subtree: true,
});
`);
});```
How can I detect navigation then
with navigation event
there is did-navigate-in-page also
Didn't help
then its not possible