How does jQuery store data with .data()?
- by TK
I am a little confused how jQuery stores data with .data() functions.
Is this something called expando?
Or is this using HTML5 Web Storage although I think this is very unlikely?
The documentation says:
The .data() method allows us to attach data of any type to DOM elements in a way that is safe from circular references and therefore from memory leaks.
As I read about expando, it seems to have a rick of memory leak. Unfortunately my skills are not enough to read and understand jQuery code itself, but I want to know how jQuery stores such data by using data().
http://api.jquery.com/data/