android-components / mozilla.components.concept.engine.webextension / WebExtensionRuntime / disableWebExtension


open fun disableWebExtension(extension: WebExtension, source: EnableSource = EnableSource.USER, onSuccess: (WebExtension) -> Unit, onError: (Throwable) -> Unit = { }): Unit (source)

Disables the provided WebExtension. If the extension is already disabled the onSuccess callback will be invoked, but this method has no effect on the extension.


extension - the extension to disable.

source - EnableSource to indicate why the extension is disabled.

onSuccess - (optional) callback invoked with the enabled WebExtension

onError - (optional) callback invoked if there was an error disabling the installed extensions. This callback is invoked with an UnsupportedOperationException in case the engine doesn’t have web extension support.