[html5] [HTML5] HTML file inclusion
doekman at gmail.com
doekman at gmail.com
Thu Aug 2 14:56:44 PDT 2007
On 8/2/07, Jon Barnett <jonbarnett at gmail.com> wrote:
> On 8/2/07, doekman at gmail.com <doekman at gmail.com> wrote:
> > On 7/14/07, Master Leep <dojo at masterleep.com> wrote:
> This could be accomplished with just an iframe is there was a way to
> make <iframe> size itself automatically according to the its contents.
> I've mentioned this before. Regarding "replaced elements", CSS
> doesn't say anything regarding the integral dimensions of an <iframe>.
> Most browsers (all graphical browsers?) just assign a default height
> and width if none are specified on an <iframe>. If HTML could define
> the integral dimensions of an iframe to auto-fit its contents, that
> would be nice. Even if that required an extra attribute on the
> <iframe> I'd be for it.
The thing with an iframe is: it has it's own global context (an other
window object), and it's a different document. This has it advantages
and disadvantages.
The "replace" pattern I described here is actually used a lot. Ruby on
Rails uses it a lot, iUI provides for it (fetching the next 10
elements).
> Auto-sizing an iframe is fairly difficult to do with javascript, and
> pretty much impossible if the embedded document is on a different
> domain as the parent document.
True, but why do you want an iframe for this. What things can you
accomplish, you can't do with a replace-innerHTML-with-contents.
The only use-case I've seen (I'm sure there are more) for iframes is
for widgets having their own "namespace" (like google gadgets or
whatever they're called, and others).
--
|\
| \
|_/oeke
doekman at gmail.com
More information about the Help
mailing list