logoalt Hacker News

silvestrov05/03/20252 repliesview on HN

The real problem with iframes is that their size is set by the parent document only.

They would be a lot more useful if we could write e.g. <iframe src=abc.html height=auto width=100> so the height of the iframe element is set by the abc.html document instead of the parent document.


Replies

jefftk05/03/2025

You could do this with js in the child document, if its important to keep js out of the parent.

show 1 reply
baggy_trough05/03/2025

You can achieve that with js in the parent document.

show 1 reply