is there an easy way to disable Storage?

47 views
Skip to first unread message

Joshua Kappon

unread,
Sep 9, 2012, 2:02:53 PM9/9/12
to google-we...@googlegroups.com
Hi

We use gwt's Storage class to persist data.
our code calls Storage.getLocalStorageIfSupported(); before each try.

Is there an easy way to create a mock of Storage so that Storage.getLocalStorageIfSupported() returns false all the time?
We thought about extending it and using <replace-with> on our module, but Storage is final.

any thoughts?

Jens

unread,
Sep 9, 2012, 2:28:16 PM9/9/12
to google-we...@googlegroups.com
In your module you could set the property "storageSupport" to "no" to disable storage (see Storage.gwt.xml).

-- J.

Joshua Kappon

unread,
Sep 9, 2012, 6:16:18 PM9/9/12
to google-we...@googlegroups.com
On Sunday, September 9, 2012 9thanks a :28:17 PM UTC+3, Jens wrote:
> In your module you could set the property "storageSupport" to "no" to disable storage (see Storage.gwt.xml).
>
>
> -- J.

Thanks Jen, it works perfectly!

Reply all
Reply to author
Forward
0 new messages