android-components / mozilla.components.concept.engine.webextension / Metadata

Metadata

data class Metadata (source)

Provides information about a WebExtension.

Constructors

Name Summary
<init> Metadata(version: String, permissions: List<String>, hostPermissions: List<String>, name: String?, description: String?, developerName: String?, developerUrl: String?, homePageUrl: String?, optionsPageUrl: String?, openOptionsPageInTab: Boolean, disabledFlags: DisabledFlags, baseUrl: String)
Provides information about a WebExtension.

Properties

Name Summary
baseUrl val baseUrl: String
Base URL for pages of this extension. Can be used to determine if a page is from / belongs to this extension.
description val description: String?
Description of the extension: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/description
developerName val developerName: String?
Name of the extension developer: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer
developerUrl val developerUrl: String?
Url of the developer: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer
disabledFlags val disabledFlags: DisabledFlags
Describes the reason (or reasons) why an extension is disabled.
homePageUrl val homePageUrl: String?
Url of extension’s homepage: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/homepage_url
hostPermissions val hostPermissions: List<String>
Required host permissions: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions#Host_permissions
name val name: String?
Name of the extension: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/name
openOptionsPageInTab val openOptionsPageInTab: Boolean
Whether or not the options page should be opened in a new tab: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/options_ui#syntax
optionsPageUrl val optionsPageUrl: String?
Options page: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/options_ui
permissions val permissions: List<String>
Required extension permissions: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions#API_permissions
version val version: String
Version string: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/version

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.