Create element in light dom

Hi,

I’m trying to integrate Adyen payments into my application. The Adyen javascript library requires a div element in the light dom to attach to = the library is incompatible with the shadow dom. Is it possible to define some simple light dom elements somewhere?

Does it matter where in the DOM you attach it? If not, you can always add it to the UI instance, which attaches it to the body element

Otherwise if you are using templates, the template contents will end up in a shadow root but any child you add to a template (which can be assigned to a slot in the template) is in the light DOM.

If you do layouting with Java layout classes then everything is in the light DOM

Brilliant, thanks Artur. I appended a child element to the template in Java and added a into the template and everything is now working and the div is visible :-).
I also tried UI.getCurrent().getElement().appendChild(…, but this did not show up in the DOM at all.