Is there a way to display a webpage in an IFrame in haxe-js?

I only found this, but I’m not sure how to use this:
js.html.IFrameElement - Haxe 4.3.4 API

I found this, though:

var iframe = document.createElement('iframe');
iframe.setAttribute('src', ""); = 450 + 'px'; = 200 + 'px';

But this seems to be generates beneath the <div id="openfl-content"/> - since the div’s default style is 100% width/height, it pushed down the iframe from viewing area of browser.

You might be able to do something like this to take the iframe outside of the normal document flow: = "absolute";

Then, you’ll need to manually position it.

1 Like

When you create an iframe dynamically using JavaScript and append it directly to document.body, it might not appear where you intend if there are conflicting CSS styles affecting its position. This can happen if the default styles of a container (openfl-content in your case) force it out of view.