From the wish-list for a DOM Builder. I'm cheating in this version with a separate the createElement and appendChild method, it was just too many characters. DOM4 may have shorter create and append methods. (see: w3c www-dom list.)
A function that turns a non-nested (fab)-style micro-DSL such as the following into a DOM, without using HTML.
domBuilder(
[/HTML/],
[/HEAD/],
[/TITLE/],
"Wouldn't this be cool?",
[],
[],
[/BODY/],
[/DIV/, {id: "container"}],
"Hello, world",
[],
[],
[]
)
hmmmm, not so sure about having to pass the dsl function in... that's definitely cheating!