W3C home > Mailing lists > Public > public-html@w3.org > January 2010

Re: Trying to use <iframe srcdoc= >

From: Gavin Carothers <gavin@carothers.name>
Date: Mon, 25 Jan 2010 15:45:46 -0800
Message-ID: <273883011001251545h1fc3123bvc5c0d950a37415f0@mail.gmail.com>
To: HTMLwg <public-html@w3.org>
On Mon, Jan 25, 2010 at 3:35 PM, Gavin Carothers <gavin@carothers.name> wrote:
> On Mon, Jan 25, 2010 at 3:24 PM, Smylers <Smylers@stripey.com> wrote:
>> Gavin Carothers writes:
>>
>>> No browser today supports srcdoc, and when it fails no content is
>>> shown on the page. ... Am I missing something?
>>
>> That HTML5 is far from implemented in widely deployed browsers.
>>
>> You're correct that this feature can't be used right now.  There are all
>> sorts of HTML, CSS, and JavaScript features which couldn't be used at
>> the time they were specced but which are now an everyday part of
>> webpages; we just had to wait patiently a few years till they were
>> usable.
>>
>> <iframe sandbox srcdoc="..."> is like that, in that it's only intended
>> to be used by authors once browser support it.
>
> My worry is that with such a painful fall back experience it won't be
> usable for even longer. Yes lots of HTML, CSS, and JavaScript features
> couldn't be used when spec'd, but they started being used when only a
> small percentage supported it. With this, I can't really see
> supporting it as a publisher/author until a HUGE percentage of
> browsers support it. :\
>
> --Gavin

Question for browser implementers:

Currently sandbox is tied to iframe in the spec, is that strictly
necessary? Would it be possible to implement @sandbox in such a way
that it could be used on a div/article/p?

eg:
<div sandbox="allow-same-origin">
<p>javascript:x = 3; (x &gt; 5)? "x is less": "x is greater"<br>
should be:<br>
javascript:x = 3; (x &gt; 5)? "x is greater" : "x is less"<br>
</p>
</div>

>From an authoring/publishing perspective it would be MUCH simpler to
use and deploy. The fall back story is also much better, as older
browsers would still see the content (yes, that's a feature, not a
bug). If something needed to be more heavily sandboxed (only shown if
sandboxed) the iframe model would still work.

--Gavin
Received on Monday, 25 January 2010 23:46:19 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:13 UTC