Extension

Extensions allow developers to extend and customize the application with various components and functionality. Extensions can provide various types of components, including types, type views, presenters, actions, and more. Extensions interact with the system via the Extension Api.

The Extension System in Black Fennec manages the lifecycle of extensions, which includes four states: at rest, loaded, active, and error state.

../../../_images/a67a63f23d4235a20b71e88f9413e7b090d6ea14571a562ee2fe4e10c442f7bd.svg

When an extension is first installed, it is in the “at rest” state. When the Extension Service loads the extension, it transitions to the “loaded” state. From there, the extension can be activated and move to the “active” state, allowing it to utilize the features and functionality of the Black Fennec application. If an error occurs while the extension is active, it will transition to the “error state”. In this state the extension can be reset and return to the “at rest” state.

Extensions can also define dependencies on other extensions, which means that they require certain other extensions to be installed and loaded in order to function properly. This helps to ensure that the necessary components and functionality are available to the extension.

There are also some recommended extensions that are commonly used in Black Fennec installations. These include the Black Fennec Core extension, which provides the basic type views, a presenter, and some actions, and the Black Fennec Base extension, which provides commonly used types such as dates, URLs, and images.