I have this object:
var Settings = { color: localStorage.color, size : localStorage.size };
I would like to automatically save the new values ββin localStorage after changing them, this means that I would like to do something like this:
Settings.onchange = function(p){ localStorage[p] = this[p]; };
Is it possible?
PS: only Chrome support required.
source share