Extensions
Maho Browser supports Chrome-compatible extensions that use the Manifest V3 standard. In most cases, extensions built for Chrome can run in Maho with minimal or no modification, as long as they depend only on the APIs Maho exposes.
Overview
Section titled “Overview”Extensions are loaded from unpacked directories. Maho does not use Chrome Web Store integration. Instead, you point the browser at a local extension directory that contains a valid manifest.json file.
When Maho loads an extension, it validates the manifest and reports errors if the manifest does not meet the supported schema.
Manifest V3 reference
Section titled “Manifest V3 reference”Maho supports the following Manifest V3 fields.
| Field | Required | Notes |
|---|---|---|
manifest_version | Yes | Must be 3 |
name | Yes | String |
version | Yes | String in semver format |
description | No | String |
icons | No | Icon map, commonly 16, 48, and 128 |
action | No | Browser toolbar button configuration |
background | No | Service worker configuration |
content_scripts | No | Script and style injection rules |
permissions | No | Extension permissions |
host_permissions | No | URL pattern permissions |
web_accessible_resources | No | Resources exposed to pages |
content_security_policy | No | Extension page CSP |
options_page | No | Extension options page |
options_ui | No | Options UI configuration |
devtools_page | No | DevTools integration page |
Required fields
Section titled “Required fields”manifest_version
Section titled “manifest_version”Must be set to 3. Maho only supports Manifest V3 extensions.
The extension name. This field is required and must be a string.
version
Section titled “version”The extension version in semver format. Maho expects a standard version string.
Optional fields
Section titled “Optional fields”description
Section titled “description”A short human-readable summary of the extension.
Icon paths keyed by size. Common sizes include:
1648128
action
Section titled “action”Defines the browser toolbar button. Supported properties include:
default_popupdefault_icondefault_title
background
Section titled “background”Declares the background service worker. Maho supports:
service_workertype: "module"
content_scripts
Section titled “content_scripts”Describes scripts and styles injected into matching pages.
Each entry may include:
matchesjscssrun_atall_frames
permissions
Section titled “permissions”Declares extension permissions such as:
storagetabsactiveTabscripting
host_permissions
Section titled “host_permissions”Declares URL patterns the extension can access, such as:
*://*.example.com/*
web_accessible_resources
Section titled “web_accessible_resources”Lists resources that extension pages or content scripts expose to matching web pages.
content_security_policy
Section titled “content_security_policy”Defines the extension page content security policy. Maho supports the extension_pages property.
options_page and options_ui
Section titled “options_page and options_ui”Use these fields to provide settings pages.
options_pagepoints to a page pathoptions_uisupportspageandopen_in_tab
devtools_page
Section titled “devtools_page”Registers a DevTools page for the extension.
Installation
Section titled “Installation”Extensions are installed from unpacked directories only.
Install process
Section titled “Install process”- Locate the extension directory
- Ensure the directory contains
manifest.json - Load the directory in Maho
- Review validation results if Maho reports manifest errors
Important constraint
Section titled “Important constraint”Maho does not support installing extensions from the Chrome Web Store.
Lifecycle
Section titled “Lifecycle”Maho follows the normal extension lifecycle for unpacked MV3 extensions.
Install
Section titled “Install”During install, Maho:
- Parses the manifest
- Validates supported fields
- Loads extension resources
- Starts the background service worker
Enable
Section titled “Enable”When enabled, Maho:
- Injects content scripts into matching pages
- Shows the extension action button in the toolbar
- Makes extension APIs available to the extent they are bridged by Maho
Disable
Section titled “Disable”When disabled, Maho:
- Removes content scripts from active use
- Hides the action button
- Stops the service worker
Uninstall
Section titled “Uninstall”When uninstalled, Maho:
- Clears extension data
- Wipes extension storage
- Removes all installed resources for that extension
Content script matching
Section titled “Content script matching”Content scripts use Chrome-style matching rules.
Match patterns
Section titled “Match patterns”The matches field supports standard Chrome match patterns, including:
<all_urls>*://*.example.com/*
Glob patterns
Section titled “Glob patterns”Maho also supports glob patterns for more fine-grained URL matching where applicable.
Run time
Section titled “Run time”The run_at field supports the standard MV3 injection times:
document_startdocument_enddocument_idle
Frame targeting
Section titled “Frame targeting”Use all_frames to control whether scripts inject into subframes.
trueinjects into iframes as well as the top-level framefalseinjects only into the top-level frame
Storage API
Section titled “Storage API”Maho implements chrome.storage.local for extension storage.
Supported methods
Section titled “Supported methods”| Method | Behavior |
|---|---|
get(keys) | Retrieve stored values |
set(items) | Store key-value pairs |
remove(keys) | Delete specific keys |
clear() | Wipe all storage for the extension |
Change events
Section titled “Change events”Storage change events fire when values change. Change records include oldValue and newValue.
This lets extensions react to local state updates without polling.
Extension bridge
Section titled “Extension bridge”Maho provides bridge APIs for communication between extension scripts and the browser.
Supported bridge behavior
Section titled “Supported bridge behavior”chrome.tabs.query()for querying open tabschrome.runtime.sendMessage()andonMessagefor extension messaging- Tab management APIs for creating, updating, and removing tabs
Scope limits
Section titled “Scope limits”Only APIs that Maho explicitly bridges are available. Not every Chrome API is exposed.
If an extension depends on an unsupported API, it may install but fail when it tries to call that API.
Compatibility guidance
Section titled “Compatibility guidance”For best results, keep extensions within the supported MV3 surface area:
- Use
manifest_version: 3 - Prefer APIs Maho explicitly supports
- Keep background logic in a service worker
- Declare all required permissions and host permissions up front
Troubleshooting
Section titled “Troubleshooting”Manifest validation errors
Section titled “Manifest validation errors”If Maho rejects an extension at load time, check the manifest for:
- Missing required fields
- Invalid
manifest_version - Version strings that do not follow semver format
- Unsupported field shapes or values
Content scripts not running
Section titled “Content scripts not running”Verify:
- The
matchespatterns are correct - The page URL is covered by
host_permissionswhere needed run_atis set appropriatelyall_framesmatches the intended injection target
Storage behavior
Section titled “Storage behavior”If extension state does not persist as expected, confirm that the extension is using chrome.storage.local and not relying on an unavailable storage API.
Summary
Section titled “Summary”Maho’s extension support is centered on unpacked Manifest V3 extensions, Chrome-style content script matching, local storage, and a limited bridge of browser APIs. Extensions that stay within that supported surface can run in Maho with little friction.