W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2010

[whatwg] Partial HTML5 documents

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Tue, 7 Dec 2010 23:45:35 -0800
Message-ID: <AANLkTik=uMbnrjP1N6aBREP_LPTk1AkRTHAQsvU9W8Y2@mail.gmail.com>
On 9/9/10, Rostislav Hristov <rostislav.hristov at gmail.com> wrote:
> Hello,
> I'm looking for a way to define valid partial HTML fragments that can
> be included into other documents using a server-side language or
> injected using AJAX. The current specification doesn't have any major
> restrictions in this area but it always require the presence of a
> TITLE tag which in this specific case is not needed. Does anybody have
> an idea if the TITLE can be skipped somehow or how this whole thing
> can be implemented properly? Do you think it should be specified?

I may have misunderstood, but it sounds like you might be able to use

Example copy'n'pasted from c.l.js:

var s = "<script>alert(1)</script>";
var range = document.createRange();
var documentFragment = range.createContextualFragment(s);
Received on Tuesday, 7 December 2010 23:45:35 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:28 UTC