On Wed, 09 May 2012 19:29:42 +0200, Ryosuke Niwa <[email protected]> wrote:
On May 9, 2012 10:26 AM, "Simon Pieters" <[email protected]> wrote:
On Wed, 09 May 2012 19:01:42 +0200, Ian Hickson <[email protected]> wrote:
Quick alternative proposal that might work for both <template> parsing
and
DocumentFragment.innerHTML:
Have createDocumentFragment() take as an argument a context element.
Maybe also make it a mutable attribute of the object. Defaults to its
owner document's body element or root element or some such. Null
means
no root element.
var df = document.createDocumentFragment(document.body);
df.contextElement = document.createElement('style');
Or just string with the tag name, so it works the same as <template
context>?
What happens when I pass "a"?
I think that should get "in body". Do we need to support anything more
than "svg" and "math" to get foreign content parsing here?
--
Simon Pieters
Opera Software