Warning: This feature is a work in progress and may be incomplete or subject to change. If you see an error or something that could be improved, please make a pull-request. The link that documents this feature can be found at the bottom of the page.
Browser flags allow you to pass custom command-line flags to the browser during launch. This can be useful for enabling experimental features, disabling security policies, or customizing the browser's behavior in development mode.
When you run your extension in development mode, you can specify browser flags to customize the browser's behavior. Extension.js will hook into the browser's launch process and pass the specified flags to the browser binary.
You can configure browser flags in the extension.config.js
file by using the browserFlags
key.
These flags will be passed to the browser when it launches during the development process.
Here’s an example of how you can use browser flags in your extension.config.js
:
In this example:
--disable-web-security
disables web security features like CORS, and --auto-open-devtools-for-tabs
opens DevTools for each new tab.--devtools
opens DevTools by default, and --new-instance
launches a new browser instance for testing purposes.The available flags vary between browsers. Below are links to where you can find more information on the supported flags for each browser.
Browser | Usage | More Information |
---|---|---|
Chrome | extension dev --browser=chrome |
Chrome Flags |
Edge | extension dev --browser=edge |
Edge Flags |
Firefox | extension dev --browser=firefox |
Firefox Flags |
Chromium-based | extension dev --browser=chromium-based |
Chromium Flags |
Gecko-based | extension dev --browser=gecko-based |
Firefox-based browsers share the same flags as Firefox. |
If your target browser is not listed here, it may not have publicly disclosed its available flags. If you are aware of resources for browser flags for unsupported browsers, please update this documentation.