Re: Simplifying element creation

>>> E.g.<div>Hello<a href="/">World</a></div>  is represented as:
>>>
>>>  ["div", "Hello ", ["a", {href:"/"}, "World"]]

I consider using html fragments instead of json-like representations
for bulk element creation more optimal. It's non-ambiguous and doesn't
require many intermediate temporary objects, which just add
unnecessary overhead, because they would have to be created,
traversed, sanatized (handling getters and setters, or properties with
unexpected types), while the html parser does one pass (in an ideal
situation) and creates everything in one go.

Received on Tuesday, 4 October 2011 15:27:39 UTC