Provides methods to list and purge the various types of data used by websites visited with hs.webview
.
This module is only available under OS X 10.11 and later.
This module allows you to list and selectively purge the types of data stored locally for the websites visited with the hs.webview
module. It also adds support for non-persistent datastores to hs.webview
(private browsing) and allows a non-persistent datastore to be shared among multiple instances of hs.webview
objects.
The datastore for a webview contains various types of data including cookies, disk and memory caches, and persistent data such as WebSQL, IndexedDB databases, and local storage. You can use methods in this module to selectively or completely purge the common datastore (used by all Hammerspoon hs.webview
instances that do not use a non-persistent datastore).
Signature | hs.webview.datastore.websiteDataTypes() -> table |
---|---|
Type | Function |
Description | Returns a list of the currently available data types within a datastore. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/webview/libwebview_datastore.m line 20 |
Signature | hs.webview.datastore.default() -> datastoreObject |
---|---|
Type | Constructor |
Description | Returns an object representing the default datastore for Hammerspoon |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/webview/libwebview_datastore.m line 47 |
Signature | hs.webview.datastore.fromWebview(webview) -> datastoreObject |
---|---|
Type | Constructor |
Description | Returns an object representing the datastore for the specified |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/webview/libwebview_datastore.m line 87 |
Signature | hs.webview.datastore.newPrivate() -> datastoreObject |
---|---|
Type | Constructor |
Description | Returns an object representing a newly created non-persistent (private) datastore for use with a Hammerspoon |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/webview/libwebview_datastore.m line 66 |
Signature | hs.webview.datastore:fetchRecords([dataTypes], callback) -> datastoreObject |
---|---|
Type | Method |
Description | Generates a list of the datastore records of the specified type, and invokes the callback function with the list. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/webview/libwebview_datastore.m line 117 |
Signature | hs.webview.datastore:persistent() -> bool |
---|---|
Type | Method |
Description | Returns whether or not the datastore is persistent. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/webview/libwebview_datastore.m line 381 |
Signature | hs.webview.datastore:removeRecordsAfter(date, dataTypes, [callback]) -> datastoreObject |
---|---|
Type | Method |
Description | Removes the specified types of data from the datastore if the data was added or changed since the given date. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/webview/libwebview_datastore.m line 287 |
Signature | hs.webview.datastore:removeRecordsFor(displayNames, dataTypes, [callback]) -> datastoreObject |
---|---|
Type | Method |
Description | Remove data from the datastore of the specified type(s) for the specified site(s). |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/webview/libwebview_datastore.m line 186 |