W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2011

[whatwg] createContextualFragment in detached contexts

From: Erik Arvidsson <arv@chromium.org>
Date: Fri, 30 Sep 2011 11:22:36 -0700
Message-ID: <CAJ8+GojBeY_ztPG+pPMaVDr_CAjcFH4wZEi34avNmftpaW8Xjg@mail.gmail.com>
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" +

The only one that stands a chance is E4X.

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

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