[whatwg] Making cross-origin <iframe seamless=""> (partly) usable

Jonas Sicking jonas at sicking.cc
Sat Dec 15 17:37:35 PST 2012

On Wed, Dec 5, 2012 at 8:54 AM, Ian Hickson <ian at hixie.ch> wrote:
> On Wed, 5 Dec 2012, Jonas Sicking wrote:
>> >>
>> >> It seems to me like the best solution is to have a new HTTP header,
>> >> with the four following values being allowed:
>> >>
>> >>    Seamless-Options: allow-shrink-wrap
>> >>    Seamless-Options: allow-styling
>> >>    Seamless-Options: allow-shrink-wrap allow-styling
>> >>    Seamless-Options: allow-styling allow-shrink-wrap
>> >
>> > I guess it depends how costly you think it is to mint new HTTP headers
>> > rather than having fewer, harder working headers.
>> I hear no end of people arguing that HTTP headers are too hard for
>> people to use. Could we make these settable through <meta> elements as
>> well as, or instead of, using headers.
> The problem is that we need to have the information before we create the
> Document, since once the Document is created the page might be rendered,
> and if the information comes after the Document is rendered, there would
> be flicker (different sizes for the iframes, different styles in the
> iframes).

One solution would be not not render the contained document in the
<iframe seamless=""> until we hit the element that opts in to
cross-origin seamless rendering.

If the document never opts in, it'll never get rendered, but is still loaded.

This might be non-trivial to implement though since I believe that
unrendered documents is not something that exists in the platform
today. The simplest way to emulate it would be to make the <iframe>
act as if it was display:none.

/ Jonas

More information about the whatwg mailing list