Again, the problem needs defining. I don't believe a perfect solution is possible. To get the size of the iframe's content, an initial height of the iframe must be set. Which means that the content's height can be affected via the vh unit and media queries. There's an unresolvable circular dependency there.
So you're looking for a solution which is "good enough" for your scenario. In which case, any of the proposed solutions might do. But if you can identify why a particular solution doesn't work for you, it might be possible to point you to a better one for your scenario.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Again, the problem needs defining. I don't believe a perfect solution is possible. To get the size of the iframe's content, an initial height of the iframe must be set. Which means that the content's height can be affected via the vh unit and media queries. There's an unresolvable circular dependency there.
So you're looking for a solution which is "good enough" for your scenario. In which case, any of the proposed solutions might do. But if you can identify why a particular solution doesn't work for you, it might be possible to point you to a better one for your scenario.