Interacting with HTML header using custom element

Hi everyone !

We are currently building a preloader that is supposed to stop once the page is fully charged ; therefore, we need to pass data to the HTML header, but as you all know, accessing DOM is not possible with WIX APIs.

I was wondering if and how we would be able to do it using a custom element ? Any idea ?

Thank you !