UserContentFilterStore.save

Asynchronously save a content filter from a set source rule.

Asynchronously save a content filter from a source rule set in the WebKit content extesions JSON format.

The identifier can be used afterwards to refer to the filter when using webkit.user_content_filter_store.UserContentFilterStore.remove and webkit.user_content_filter_store.UserContentFilterStore.load. When the identifier has been used in the past, the new filter source will replace the one saved beforehand for the same identifier.

When the operation is finished, callback will be invoked, which then can use webkit.user_content_filter_store.UserContentFilterStore.saveFinish to obtain the resulting filter.

Parameters

identifier string

a string used to identify the saved filter

source glib.bytes.Bytes

#GBytes containing the rule set in JSON format

cancellable gio.cancellable.Cancellable

a #GCancellable or null to ignore

callback gio.types.AsyncReadyCallback

a #GAsyncReadyCallback to call when saving is completed