[whatwg] createContextualFragment in detached contexts

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

Received on Friday, 30 September 2011 11:22:36 UTC