[OT] HTML: div/iframe hybrid?

Alix Pexton via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 26 01:34:44 PST 2015


On 25/02/2015 9:55 PM, Nick Sabalausky wrote:
> (Pardon the ot, but I know there are other webdevs here). For various
> reasons, I like to keep my html...uhh...let's say "non-bleeding-edge"
> :), downside of course being I tend to not be quite as up on what's out
> there as I should be. So just tossing this question out there:
>
> I know (at least historically) iframes don't normally resize based on
> their internal content, but only based on the the outer html page. Aside
> from the obvious JS, does modern HTML/CSS provide any way to have
> something like an iframe (ie, embed content from another URL), but
> otherwise behaves and flows more like a div, expanding (at least
> vertically, even if nothing else) as the embedded content expands?
>
> Would it be too kludgey or questionable-compatibility (or just fail) to
> just use CSS to set the iframe element to block-style layout?

My understanding of the argument against doing this is that it would be 
a potential security hole. If the content of an iframe could control its 
size it could theoretically hijack the parent page.

Instead, I would consider using JS to load and insert the content, or 
generate the composite page on the sever.

A...

---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com



More information about the Digitalmars-d mailing list