android-components / mozilla.components.browser.state.state / WebExtensionState


data class WebExtensionState (source)

Value type that represents the state of a web extension.


Name Summary
<init> WebExtensionState(id: String, url: String? = null, name: String? = null, enabled: Boolean = true, allowedInPrivateBrowsing: Boolean = false, browserAction: WebExtensionBrowserAction? = null, pageAction: WebExtensionPageAction? = null, popupSessionId: String? = null, popupSession: EngineSession? = null)
Value type that represents the state of a web extension.


Name Summary
allowedInPrivateBrowsing val allowedInPrivateBrowsing: Boolean
Whether or not this web extension is allowed in private browsing mode. Defaults to false.
browserAction val browserAction: WebExtensionBrowserAction?
The browser action state of this extension.
enabled val enabled: Boolean
Whether or not this web extension is enabled, defaults to true.
id val id: String
The unique identifier for this web extension.
name val name: String?
The name of this web extension.
pageAction val pageAction: WebExtensionPageAction?
The page action state of this extension.
popupSession val popupSession: EngineSession?
The EngineSession displaying the browser or page action popup.
popupSessionId val popupSessionId: String?
The ID of the session displaying the browser action popup.
url val url: String?
The url pointing to a resources path for locating the extension within the APK file e.g. resource://android/assets/extensions/my_web_ext.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.