Esta traducción está incompleta. Por favor, ayuda a traducir este artículo del inglés.
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. Where a feature is partially supported, we've indicated what the gaps are.
It's safe to assume that features and APIs not listed here at all are not yet supported.
manifest.json features
Fully supported keys
applications
browser_action
page_action
default_locale
description
manifest_version
name
version
web_accessible_resources
Partially supported keys
background
Firefox does not support the "persistent"
property. Background scripts stay loaded all the time.
content_scripts
Firefox does not currently support:
include_globs
exclude_globs
match_about_blank
permissions
Firefox does not yet support the following permissions:
activeTab
background
clipboardRead
clipboardWrite
geolocation
nativeMessaging
unlimitedStorage
Obviously, it also don't yet support permissions for APIs that are themselves not supported.
APIs JavaScript
APIs completamente soportadas
- alarmas
- Menú contextual
- pageAction
- Relative URLs passed to
setPopup()
are resolved relative to the caller document, rather than to the extension root.
- Relative URLs passed to
APIs parcialmente soportadas
marcadores
- Firefox does not support:
getRecent()
search()
removeTree()
(remove
also removes non-empty folders)onCreated
onRemoved
onChanged
onMoved
onChildrenReordered
onImportBegan
onImportEnded
- BookmarkTreeNodeUnmodifiable
- Firefox has special bookmarks like "Recently Bookmarked" or "Recently Visited"
browserAction
- Firefox does not support:
enable()
ordisable()
.
- Relative URLs passed to
setPopup()
are resolved relative to the caller document, rather than to the extension root.
cookies
- onChanged events might be subtely different
- Creating session cookies with
set
might fail getAllCookieStores
always just returns one default store and no tabs- accessing cookies from private tabs is impossible
extension
- Firefox only supports
:
getBackgroundPage()
getURL()
inIncognitoContext
in content scripts
i18n
- En la API JavaScript API, Firefox solo soporta
getMessage()
. - Firefox solo soporta los mensajes predefinidos
@@extension_id
y@@ui_locale
. - Firefox no localiza archivos CSS.
- Las cadenas para ser localizadas deben consistir enteramente de
__MSG_foo__
con el fin de realizar una sustitución al crearlas.
notifications
- The only supported notification options are:
iconUrl
title
message
.
- The only supported methods are:
create()
clear()
getAll()
.
- The only supported event is
onClosed
. - Firefox doesn't provide
byUser
data.
runtime
- Firefox only supports:
onStartup()
getManifest()
getURL()
id
sendMessage()
onMessage
onConnect
storage
- The only storage area Firefox supports is
local
. - Firefox does not support
getBytesInUse()
orclear()
.
tabs
- Firefox does not support:
getCurrent()
sendRequest()
getSelected()
duplicate()
highlight()
move()
detectLanguage()
captureVisibleTab()
getZoom()
setZoom()
getZoomSettings()
setZoomSettings()
Firefox treats highlighted
and active
as the same since Firefox cannot select multiple tabs.
Firefox doesn't yet support the callback
argument to executeScript()
.
webNavigation
- Firefox does not support:
getFrame()
getAllFrames()
onCreatedNavigationTarget
onHistoryStateUpdated
- transition types and qualifiers
- Filtering
onReferenceFragmentUpdated
also triggers for pushState
.
webRequest
- Firefox does not support:
handlerBehaviorChanged()
onAuthRequired
onBeforeRedirect
onErrorOccurred
- Requests can be:
- canceled only in
onBeforeRequest
- modified/redirected only in
onBeforeSendHeaders
- canceled only in
- Responses can be modified only in
onHeadersReceived
. - Filtering by
windowId
andtabId
is not supported. - The
"requestBody"
instruction inopt_extraInfoSpec
is not supported. - Redirection is not allowed in
onBeforeRequest
oronHeadersReceived
, but is allowed inonBeforeSendHeaders
. requestId
is not included in the argument passed to the listener.
windows
onFocusChanged
will trigger multiple times for a given focus change.create()
does not support thefocused
,type
, orstate
options.update()
only supports thefocused
option.
Planned APIs
We don't yet support the following APIs, but plan to, soon:
- commands
- Devtools (mostly panels)
- downloads
- history
- idle
- omnibox
- permissions
- Native messaging (runtime.connectNative)
CSS
Localized String Interpolation
We currently do not support interpolation of localized strings __MSG_
tokens in extension CSS files: bug 1209184.
Relative URLs
We resolve URLs in injected CSS files relative to the CSS file itself, rather than to the page it's injected into.
Miscellaneous incompatibilities
- Chrome allows any optional arguments to be omitted, even if followed by other arguments. Firefox currently supports this only under specific circumetances. We recommend only omitting optional arguments at the end of the arguments list, and using
null
for all other cases. - Firefox currently does not allow the
orlet
statement in ordinary web pages or Web Extensions. While it is possible to enable support for Firefox's variant of the statement using a specialconst
<script>
tag, this is not recommended. Instead, if your extension code useslet
orconst
statements, we recommend that you transpile them using Babel until support is turned on globally.