On Fri, Sep 30, 2011 at 11:22 AM, Erik Arvidsson <a...@chromium.org> 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. > How can we make improve our API to make this easier? Having said that, letting createContextualFragment create tbody seems fine though I'm a bit worried about the compatibility. - Ryosuke