Introduction
I am working with RapidWeaver - Mac OS X CMS and does not use a server environment. It has an editor and a preview mode. Preview mode is a Webkit-based visualization tool, and I can use the "Inspect Element", as you usually can with Safari.
I want to save some settings for a toolbar using localStorage or SQLite . I read some information about indexed DB, although I did not find specific implementations on how to use it.
Problems with localStorage
localStorage works fine when I stop in preview mode, when I switch between editor and preview mode, url - location.href - is slightly changed:
file:///private/var/folders/s7/x8y2s0sd27z6kdt2jjdw7c_c0000gn/T/TemporaryItems/RapidWeaver/98970/document-143873968-28/RWDocumentPagePreview/code/styled/index.html file:///private/var/folders/s7/x8y2s0sd27z6kdt2jjdw7c_c0000gn/T/TemporaryItems/RapidWeaver/98970/document-143873968-29/RWDocumentPagePreview/code/styled/index.html
document-143873968- 28 changes to document-143873968- 29
What I read about localStorage is that it is basically globalStorage [location.hostname] for FireFox. As far as I know, globalStorage is not supported in Safari, so I can not try this.
SQLite issues
When I try to open a database:
var shortName = 'mydatabase'; var version = '1.0'; var displayName = 'My Important Database'; var maxSize = 65536;
I get this in my console:
SECURITY_ERR: DOM Exception 18: An attempt was made to break through the security policy of the user agent.
This basically concludes my question, I will be grateful for any answers or comments sincerely.
source share