JBrowser Source Docs

jbrowser.context

Generated from the source code of JBrowser 1.5.4.

jbrowser/context.py · 225 lines

AppContext: the dependency container that owns and wires every service.

Construction order matters: state → services → engine (profiles, registry, lifecycle). UI components are built afterwards and only depend on this object.

UiHooks#

class UiHookssource

Callbacks the engine layer uses to ask the UI for something (set by MainWindow).

UiHooks.ask_credentials#

ask_credentials(title: str, message: str) -> tuple[str, str] | Nonesource

UiHooks.unlock_vault#

unlock_vault() -> boolsource

UiHooks.create_popup#

create_popup(profile: QWebEngineProfile, space: Space) -> QWebEnginePage | Nonesource

UiHooks.toast#

toast(text: str, icon: str='info') -> Nonesource

UiHooks.notify#

notify(notification: Any) -> Nonesource

AppContext#

class AppContext(QObject)source
AppContext(paths: AppPaths, settings: Settings, parent: QObject | None=None)

AppContext.present_notification#

present_notification(notification) -> Nonesource

AppContext.resolve_input#

resolve_input(text: str, remember: bool=True) -> QUrlsource

Turn Lazy Toolbar input into a URL: keyword search, direct URL or web search.

AppContext.save_all#

save_all() -> Nonesource

AppContext.forget_site#

forget_site(host: str) -> dictsource

Remove every trace of host (and its sub-domains): history, cookies, zoom, permissions and page storage for open cards. Returns counts for the UI.

AppContext.shutdown#

shutdown() -> Nonesource