Idea: Attach VisBug to ShadowRoot
Idea:
As adding visbug to a page could lead to side effects, wouldn't it be preferable to add it to it's own shadowroot?
Like:
let sr = document.body.attachShadow({mode: 'open'});
sr.innerHTML = "<slot></slot>"
And after this the VisBug overlays could be added to the ShadowRoot, without affecting the real Dom?
i'm willing to try out a PR and test it 👍🏻 but visbug does apply attributes to nodes and does some other things that are still "side effects", but reducing them is indeed generally nice
I'll look to create a demo
i'm willing to try out a PR and test it 👍🏻 but visbug does apply attributes to nodes and does some other things that are still "side effects", but reducing them is indeed generally nice
I saw that it add's attributes for selection. Is there a reason for this? Why is the selection not stored in some varaibles?
i'm willing to try out a PR and test it 👍🏻 but visbug does apply attributes to nodes and does some other things that are still "side effects", but reducing them is indeed generally nice
I saw that it add's attributes for selection. Is there a reason for this? Why is the selection not stored in some varaibles?
it's never been an issue, and was using DOM state as the source of truth
Yeah, maybe it's my thinking cause I'm working on a designer, wich exports the html and so my output should not contain own added attributes.