6 ms·
It doesn't account for user interaction but I might attempt to do something for that in the future. The desktop version uses puppeteer so I do force a hover st
by mrieck 7y ago
It doesn't account for user interaction but I might attempt to do something for that in the future.
The desktop version uses puppeteer so I do force a hover state on each element and get extra psuedo selectors by doing that. I'm also planning to add something so you can interact with the page first to get the page in the state you want, because right now the selection process cancels all other events (you select something by clicking).
One of the first difficult issues that I ran into was that I had to modify CSS selectors to target the subtree. For example let's say there is a selector:
#mysidebar #atable tr
Now I only want to Snip/Extract the #atable element. I have to modify the selector by chopping off #mysidebar because the html I'm giving the user is just #atable and everything below that. The problem is modifying selectors like that ruins CSS specificity. That's just one example of how things became a lot more complicated than I originally thought it would be.