WebExtensions are designed to be compatible with Chrome and Opera extensions: as far as possible, extensions written for those browsers should run on Firefox with minimal changes.
However, Firefox currently has support for only a limited set of the features and APIs supported by Chrome and Opera. We're working on adding more support, but many features are not yet supported, and we may never support some.
This article lists all features and APIs that are fully or partially supported in Firefox Developer Edition. Where a feature is partially supported, we've indicated what the gaps are.
You should assume that features and APIs not listed here at all are not yet supported.
manifest.json features
Fully supported keys
applications
browser_action
default_locale
description
icons
manifest_version
name
page_action
version
web_accessible_resources
Partially supported keys
background
Firefox does not support the "persistent"
property. Background scripts stay loaded all the time.
commands
Firefox does not support:
- Media keys as shortcuts
global
- the special command
_execute_browser_action
content_scripts
Firefox does not support:
match_about_blank
content_security_policy
Firefox does not support:
- "https://127.0.0.1" or "https://localhost" as script sources: they must be served over HTTPS.
options_ui
Firefox does not support:
chrome_style
Using options_ui
requires a valid value for the applications.gecko.id property.
permissions
Firefox does not support the following permissions:
background
clipboardRead
clipboardWrite
geolocation
unlimitedStorage
Obviously, it doesn't support permissions for APIs that are themselves not supported.
incognito
Firefox does not support the following incognito (private browsing) modes:
split
JavaScript APIs
Fully supported APIs
Partially supported APIs
bookmarks
- Firefox does not support:
export()
import()
BookmarkTreeNodeUnmodifiable
onChanged
onChildrenReordered
onCreated
onImportBegan
onImportEnded
onMoved
onRemoved
- Firefox has special bookmarks like "Recently Bookmarked" or "Recently Visited"
contextMenus
- Firefox does not support:
- the "browser_action" or "page_action" context types
downloads
- Firefox does not support:
acceptDanger()
drag()
setShelfEnabled()
onDeterminingFilename
- The
saveAs
option and values other than"GET"
for themethod
option are not supported bydownload()
extension
- Firefox does not support:
setUpdateUrlData()
- Additionally, the following deprecated properties will not be supported:
getExtensionTabs()
sendRequest()
onRequest
onRequestExternal
idle
- Firefox does not support:
setDetectionInterval()
onStateChanged
Additionally, queryState()
always returns "active"
in Firefox, regardless of the current system idle state.
management
- Firefox does not support:
createAppShortcut()
generateAppForLink()
get()
getAll()
getPermissionWarningsById()
getPermissionWarningsByManifest()
launchApp()
setEnabled()
setLaunchType()
uninstall()
LaunchType
onDisabled
onEnabled
onInstalled
onUninstalled
notifications
- Firefox does not support:
update()
onButtonClicked
- Firefox doesn't provide
byUser
data. - Firefox only supports the
"basic"
type.
- For
chrome.notifications.create(), with the "basic"
type
,iconUrl
is optional in Firefox. It is required in Chrome. - Notifications are cleared immediately when the user clicks on them. This is not the case in Chrome.
- If you call
chrome.notifications.create()
more than once in rapid succession, Firefox may end up not displaying any notification at all. Waiting to make subsequent calls until within thechrome.notifications.create() callback
function is not a sufficiently long delay to prevent this from happening. - If the
iconUrl
property is present, but invalid whenchrome.notifications.create() is called
, the notification will be displayed with space for the icon, but without the icon. In Chrome, the notification will not be displayed, an error will be shown in the extension's background page console andruntime.lastError
will be set in the callback function.
runtime
- Firefox does not support:
getPackageDirectoryEntry()
requestUpdateCheck()
restart()
sendNativeMessage()
onBrowserUpdateAvailable
onConnectExternal
onInstalled
onMessageExternal
onRestartRequired
onStartup
onSuspend
onSuspendCanceled
runtime.lastError
is anError
object in Firefox. In Chrome, it is anObject
with the error text as thestring
value of themessage
property.
storage
- Firefox does not support:
managed
storage areasync
storage areagetBytesInUse()
.
tabs
- Firefox treats
highlighted
andactive
as the same, since Firefox has no concept of selecting multiple tabs. - In Firefox, you need the
tabs
permission if you want to includeurl
in thequeryInfo
parameter totabs.query()
. -
In Firefox, relative URLs passed into
tabs.executeScript()
ortabs.insertCSS()
are resolved relative to the current page URL. In Chrome, these URLs are resolved relative to the add-on's base URL. To work cross-browser, you can specify the path as an absolute URL, starting at the add-on's root, like this:/path/to/script.js
- In Firefox, you can't open (using {{WebExtAPIRef("tabs.create")}}), or navigate to (using {{WebExtAPIRef("tabs.update")}}) privileged URLs:
- chrome: URLs
- javascript: URLs
- data: URLs
- privileged about: URLs (for example, about:config, about:addons, about:debugging)
- Additionally, the following deprecated properties will not be supported:
getSelected()
sendRequest()
onActiveChanged
onHighlightChanged
onSelectionChanged
webNavigation
- Firefox does not support:
onCreatedNavigationTarget
onTabReplaced
webRequest
- Firefox does not support:
onAuthRequired
- filtering by
windowId
andtabId
- the
"requestBody"
instruction inopt_extraInfoSpec
- In Firefox requests can be redirected only if their original URL uses the http or https scheme
windows
- Firefox does not support:
- the
focused
option increate()
- the
- In Firefox
onFocusChanged
will trigger multiple times for a given focus change.
Planned APIs
We don't support the following APIs, but plan to, soon:
This doesn't mean that these are the only additional APIs we will support, but that they are our current priorities.
Miscellaneous incompatibilities
Optional arguments
URLs in CSS
Firefox resolves URLs in injected CSS files relative to the CSS file itself, rather than to the page it's injected into.
Additional incompatibilities
Firefox does not support using alert()
from background pages. Using alert(message)
from a background page will cause the Browser Console to be opened and both a line stating "alert() is not supported in background windows; please use console.log instead." and the message
will be output to the console.
Firefox does not support confirm() from background pages. Using confirm(message) will result in a error being thrown.
Firefox does not support prompt() from background pages. Using prompt(message) will result in a error being thrown.