Open jesus2099 opened 11 months ago
Wow, @tophf was right! It is possible to manipulate shadow DOM, it's just that this website has some additional funny stuff going on!
I found a random page with #shadow-root (open)
: https://apearce.github.io/react-shadow-root/
And both those two following lines of code, read and write, did work in console (F12) and in a userscript!
alert('document.querySelector("basic-demo").shadowRoot.querySelector("span").innerText: ' + document.querySelector("basic-demo").shadowRoot.querySelector("span").innerText);
document.querySelector("basic-demo").shadowRoot.querySelector("span").appendChild(document.createTextNode(" toto"));
Blocked by:
Shadow DOM manipulation is currently not possible: https://github.com/violentmonkey/violentmonkey/issues/1852