Hi,
Is it possible to change the code in a wix HTML component (iFrame) using Javascript? Basically, the font size in my HTML component looks much different in desktop versus mobile. So, I figure I can just use the WixWindow API to modify the HTML component font based on the type of user coming to the site?
Hi,
You can use postMessage method and receive it in the HTML component using onMessage method.
Check out this article:
Good luck!
Roi.
David, have you worked it out yet? Do I understand correctly that you want the html-component uses a different font per user? If so, .postMessage the font to the component, on that side, wait for it with the onMessage and (I assume you use an inline style in html), replace it with .innerHtml. Does that make sense?
BTW: make sure to WAIT for the component to load. Read my article if it doesn´t ring a bell.