Open toinbis opened 4 years ago
Hi @toinbis,
You could use the lol-html Rust library to make a selector generator, but that functionality doesn't exist out-of-the-box today. What is your use-case for generating selectors in Workers?
Hi @Electroid - thanks a lot for responding!
Our app allows users to to load their web page in an 'visual editor', make modifications and have those modifications applied on runtime with worker. We provide a worker and the 'visual page editor', clients create the 'transformations' themselves.
Using same codebase for generating selectors and actually selecting elements on runtime seems a wise way to go...
Hi @Electroid ,
maybe you could write a few guidelines on how to achieve this? We would probably try to find a rust developer to try to work on this...
Much appreciated in advance!
I'm also interested in generating selectors, @toinbis did you finally get it?
Hi,
would it be possible in any ways to generate selector itselfusing lol-html? The input would be: a) the document that will be processed by HTMLRewriter in a worker later on; b) the element that needs to be selected (as generated by 'click' document event listener);
Output needed would be the (most effective) selector to be used to select this element on worker's execution.
Thanks!
P.S. am not familiar with internals of lol-html, it's a bit of a long-shot question. Thanks in advance for looking into it and replying.