[whatwg] createContextualFragment in detached contexts

Erik Arvidsson arv at chromium.org
Fri Sep 30 11:22:36 PDT 2011


On Fri, Sep 30, 2011 at 11:04, Ryosuke Niwa <ryosuke.niwa at gmail.com> wrote:
> So you think authors prefer creating new nodes using markup than explicitly constructing them via createElement, etc...

I think that there are cases where markup should be used to create
complex DOM. Even with an almost perfect DSL it would be hard to beat
HTML for its conciseness.

Try to beat this with any DSL of your choice.

var df = createContextualFragment(
  "<table><thead><tr><td>API<td>Chars</thead>" +
  "<tbody><tr><td>HTML<td>Some" +
  "<tr><td>Imperative<td>More" +
  "</tbody></table>");

The only one that stands a chance is E4X.

-- 
erik



More information about the whatwg mailing list