I doubt it, since LocalStorage
can only store strings, and it seems like a bit of overkill to just save an event listener into the LocalStorage
object, when you don't know that all of your users will even have the capability.
I would consider a pseudo-element storage, similar to what is discussed here.