simulate native <select> dropdown
A user clicking on a
I guess we'd have to trigger on a mouseDown event on the
simulating mouse clicks may take this down into a rabbit hole, if shadow-dom is handled will the issues will be resolved(staying read only and capturing only final UI changes)
We are already simulating changing CSS state upon mouse hover, so I'd consider this proposal to be in the same vein. Actually I don't think I understand your comment at all! In particular: what is the relevance of shadow-dom? And what do you mean by read-only?
After mouse clicks, there will be changes at the html level ( at a dom level or via shadow dom) is it possible those can be captured so that hopefully there will be no need to simulate mouse clicks and all & just capture the state of webpage.
Ah okay; ya I can't see any DOM changes when a
I guess it's related to this one: #38 — you are not working on that?
To make sure shadow dom will help, when menu is clicked, on the new UI, try right-click-inspect on that.
Yes that's the relavent issue, from comments on the thread, this seems helpful https://github.com/medialize/ally.js/blob/master/src/observe/shadow-mutations.js
How would you replay the changes to the shadow dom though?
It's almost like normal dom
let shadow = elementRef.attachShadow({mode: 'open'});
While To access the shadowroot let myShadowDom = myCustomElem.shadowRoot;
Since iframe recording is now possible thanks to the recent commit, hope shadow dom also can also be pulled off.
Looks like we can't record this with Shadow Dom.
Otherwise we could do
document.querySelector('iframe').contentDocument.querySelector('select').attachShadow({mode: 'open'}) on https://interactive-examples.mdn.mozilla.net/pages/tabbed/select.html
(safari)
But maybe we can create our own representation of the dropdown instead
I've also tried simulating mouse clicks in the past, it works for some browsers but doesn't for others.