How does jQuery stores data with .data()?
Posted
by TK
on Stack Overflow
See other posts from Stack Overflow
or by TK
Published on 2010-03-15T09:33:41Z
Indexed on
2010/03/15
9:49 UTC
Read the original article
Hit count: 399
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()
.
© Stack Overflow or respective owner