Web XR - UI (Html) Vanishes

Hi, I am using the Web XR demo and trying to place my own html using document.createElement(‘div’) in the scene.

My html appears fine but then as soon as I toggle AR mode ON it vanishes. How is the AR overriding this? What should I do to see my UI in AR?

I have tried adjusting the z-index of the html elements but this has no effect.
Anyone know?

Thanks

Hi, I still have no idea how to address this. I see in the debug elements that AR uses application-canvas and three.js when running the WebXR. I tried appending my html to this but I get the same reult (no html drawn):


const playCanvasElement = document.getElementById('application-canvas');
    // Insert the overlay into the DOM
    playCanvasElement.parentNode.appendChild(this.analytics_overlay_div);

Anyone have any clues on adding html to an WebXr project. Is it even possible?