5 ms·
I like to maintain a clean namespace, which means that generally, instead of recording data on DOM objects, I wrap it in closures. For those circumstances wher
by Xurinos 15y ago
I like to maintain a clean namespace, which means that generally, instead of recording data on DOM objects, I wrap it in closures. For those circumstances where I absolutely cannot do that (and it is rare), I try to be as local as I can and use a wrapper name...
DOMObject.my_special_site_id.specific_data1
DOMObject.my_special_site_id.specific_data2
Nasty global variableses...
- filipmares 15y agothanks. will keep that in mind.
- catch23 15y agoAnother good option is Linq -- it's great for storing lots of data. We use it here with backbone. We're using this one: http://linqjs.codeplex.com/ http://linqjs.codeplex.com/