2011/9/11 Mo Cheng <[email protected]>: > JSON might be more flexible. But, is HTML really more complex? > Having related data as attribute started with "data-" is common practice to > bind data to HTML > <div data-id="xxx" data-foo="xxx" > > ... > </div>
It is common, but parsing the DOM for some value is much costly then parsing a JSON string, and you only need to do the parsing once, since then it will be native. Although generating DOM from that JSON can be costly, but that also needs to be done once. -- Poetro -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
