Page 1 of 1

How to activate localStorage for WebGaget (WebKit)?

Posted: Tue Feb 10, 2015 5:33 pm
by nikoniko
The topic about localStorage in webview apps
http://stackoverflow.com/questions/4527 ... 49#4608549

Is it possible implement this code for PB's Webgadget?

Re: How to activate localStorage for WebGaget (WebKit)?

Posted: Fri Feb 13, 2015 6:29 pm
by nikoniko
Thanks to forum!

I have made the solution (GadgetID(10) is a WebGadget)

Code: Select all

 
Global *pref 
  *pref  = CocoaMessage(0, GadgetID(10), "preferences")
  CocoaMessage(0, *pref, "_setLocalStorageDatabasePath:$", @"~/Library/f7builder/LocalStorage")
HTML5 data are stored and read from javascript code now and not cleared after app restart