FaviconDatabase#
Superclasses: Object
Provides access to the icons associated with web sites.
WebKit will automatically look for available icons in <link> elements on opened pages as well as an existing favicon.ico and load the images found into a memory cache if possible. That cache is frozen to an on-disk database for persistence.
If Settings
:enable-private-browsing is True
, new icons
won’t be added to the on-disk database and no existing icons will
be deleted from it. Nevertheless, WebKit will still store them in
the in-memory cache during the current execution.
Methods#
- class FaviconDatabase
-
- get_favicon(page_uri: str, cancellable: Cancellable | None = None, callback: Callable[[Object | None, AsyncResult, Any], None] | None = None, user_data: Any = None) None #
Asynchronously obtains a favicon image.
Asynchronously obtains an image of the favicon for the given page URI. It returns the cached icon if it’s in the database asynchronously waiting for the icon to be read from the database.
This is an asynchronous method. When the operation is finished, callback will be invoked. You can then call
get_favicon_finish()
to get the result of the operation.- Parameters:
page_uri – URI of the page for which we want to retrieve the favicon
cancellable – A
Cancellable
orNone
.callback – A
AsyncReadyCallback
to call when the request is satisfied orNone
if you don’t care about the result.user_data – The data to pass to
callback
.
- get_favicon_finish(result: AsyncResult) Texture #
Finishes an operation started with
get_favicon()
.- Parameters:
result – A
AsyncResult
obtained from theAsyncReadyCallback
passed toget_favicon()