Hey everybody. When I run UI.getCurrent() in a webcomponent, I get a WebComponentUI. When I call getElement() on that UI, I get such an Element <body><div></div></body> (according to toString()), which is the same as with a “regular” UI.
When I call UI.getCurrent().element.executeJs("console.warn(this)"), the browser shows the body-Element in both cases. Is this intended behaviour? The documentation from the UI class says
A UI may either represent an entire browser window (or tab) or some part of a html page where a Vaadin application is embedded.
From this, I’d expect that WebComponentUi#getElement returns something like <my-webcomponent>…