cpojer/mootools-tree — Issue #9: Collapse.LocalStorage : using powertools's LocalStorage
Author: v3
Created: 2011-11-10 20:53:45+00:00
State: open

Hi,
You're using native localStorage object in Collapse.LocalStorage. Actually, your LocalStorage wrapper from powertools can be used there instead.

We can benefit from it since It automatically fallbacks to Cookie if browser doesn't support native localStorage.
LocalStorage wrapper JSON-encodes values automaticly, so JSON.encode and JSON.decode can be removed from getState and setState functions.