[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
element markup in attributes
- From: "Simon St.Laurent" <simonstl@simonstl.com>
- To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
- Date: Wed, 17 Feb 2010 09:03:49 -0500
I hesitate a bit in raising questions about HTML5 here, mostly because
of concerns that the violence of that conversation will enter the
discussion here. Nonetheless, this list is the best place I know of to
discuss markup best practices, and seems like the right place to ask the
question.
The iframe element has always been a tricky critter, but in HTML5 it's
picked up a srcdoc attribute which "gives the content of the page that
the nested browsing context is to contain." This allows the
construction of short documents in an iframe context without requiring a
separate HTTP request through the src attribute.
Details can be found here:
<http://dev.w3.org/html5/spec-author-view/the-iframe-element.html>
<http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html>
So what does this look like? Here are three examples from those specs.
-----------------------------------
<iframe seamless sandbox="allow-same-origin" srcdoc="<p>did you get a
cover picture yet?"></iframe>
<iframe seamless sandbox="allow-same-origin" srcdoc="<p>Yeah, you can
see it <a href="/gallery?mode=cover&amp;page=1">in my
gallery</a>."></iframe>
<iframe seamless sandbox="allow-same-origin" srcdoc="<p>hey that's
earl's table.
<p>you should get earl&amp;me on the next cover."></iframe>
-----------------------------------
What do folks think? Is this reasonable, given the use case, or is this
pushing too hard on attributes and escaping?
I wonder if just letting iframe have child content would make more
sense, but I suspect that raises more compatibility problems with older
browsers.
Thanks,
--
Simon St.Laurent
http://simonstl.com/
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]