Skip to content

MozillaBrowserExtensionManifest

Corban Amouzou edited this page Jan 12, 2022 · 1 revision

MozillaBrowserExtensionManifest

The manifest format for the browser extension

struct MozillaBrowserExtensionManifest: Codable 

This is not complete or up to spec. Please see: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json for a list of all the keys and values

Inheritance

Codable

Initializers

init(_:)

Default initialization

init(_ path: URL) throws 

Parameters

  • path: The path of the manifest

Properties

author

The author of the extension

let author: String?

browserAction

The action object that specifies a dropdown tab on the toolbar of the browser.

let browserAction: BrowserAction?

defaultLocale

The name of the default locale bundle to get localized keys from. Not required unless _locale path exists at the root of the extension folder

let defaultLocale: String?

homepageURL

The url leading to the homepage of the author of the extension

let homepageURL: String?

icons

An array of icon paths keyed by size. Paths are relative to the extension folder.

let icons: [String: String]?

manifestVersion

The version of the manifest. Latest is v3

let manifestVersion: Int

name

The name of the extension.

let name: String
  • Localizable

optionsUi

The UI specification for the extension given options page

let optionsUi: OptionsUI?

permissions

A list of permissions the extension has to provide when accessing browser apis that handle user information

let permissions: [String]?

version

Version of the plugin. Created by the author. This is required

let version: String

Methods

getExtensionIcon(extensionPath:)

Gets the extension icon from the main icons array

func getExtensionIcon(extensionPath path: URL) -> NSImage? 

Parameters

  • manifest: The manifest object to get the image of
Clone this wiki locally