Replies: 1 comment 2 replies
-
|
Hi @Crooks2k Thank you very much for describing your problem and use case! It's a very interesting one. I want to be open: I don't have a lot of knowledge about Shadow DOM (yet). It would be great if you could provide an example that reproduces the issue and helps us find a solution. Regarding your questions:
I haven't tried it yet, so I don't have a working solution at the moment.
Yes, that's certainly possible (if technically feasible). We want to support any possible setup/integration that we can, so we have no reason not to support such a use case. We need the idea/request (what you did by starting this discussion) and some help/feedback from professionals like you, which can help us do the right things.
Currently, the only workaround I see is to copy our There is a callback to collect the form data when the user checks the form (which is likely one of the problems you mention that mosparo cannot find the form elements in the shadow DOM), so you could set the form data manually with the callback. However, the entire initialization is not compatible with the shadow DOM, as far as I understand right now, so the only solution for that is to copy and adjust the file as mentioned above. I'm looking forward to your example and appreciate your idea. Kind regards, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Mosparo team,
I'm currently working on integrating Mosparo into a web application built using Lit Element heavily on the use of Shadow DOM for encapsulating component structure and styles.
While trying to include Mosparo's spam protection in a form rendered inside a Lit component, I noticed that Mosparo does not detect or apply its logic to the form fields or the
#mosparo-boxcontainer when they are inside the component's shadow root.However, if I expose the form and the Mosparo container to the main DOM using
innerHTML, Mosparo works as expected and applies its logic correctly.Problem Summary:
#mosparo-boxdiv is not found by Mosparo when inside the shadow root.Questions:
Any guidance or suggestions would be greatly appreciated. I’d be happy to provide a minimal reproducible example if needed.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions