--- title: Chrome incompatibilities slug: Mozilla/Add-ons/WebExtensions/Chrome_incompatibilities translation_of: Mozilla/Add-ons/WebExtensions/Chrome_incompatibilities ---
Веб расширения разработаны с поддержкой совместимости с расширениями Хрома и Оперы на сколько это возможно. Расширения, написанные для этих браузеров, должны работать в Firefox с минимальными изменениями.
Все же, Firefox на данный момент имеет поддержку только для ограниченного набора функций и API, поддержуемых в Хроме и Опере. Мы работаем над добавлением большей поддержки, но много функций пока еще не поддерживаются и некоторые из них никогда не будут поддерживаться.
Эта статья перечисляет все функции и API, которые полностью поддерживаются в Firefox Developer Edition (на данный момент Firefox 47). Там где функция поддерживается частично, мы указали на проблемные места.
You should assume that features and APIs not listed here at all are not yet supported.
applicationsbrowser_actiondefault_localedescriptioniconsmanifest_versionnamepage_actionversionweb_accessible_resourcesFirefox не поддерживает "устойчивое" свойство. Фоновые скрипты остаются загруженными всё время.
Firefox не поддерживает:
global_execute_browser_actionFirefox не поддерживает:
match_about_blankFirefox не поддерживает:
Firefox не поддерживает:
chrome_styleUsing options_ui requires a valid value for the applications.gecko.id property.
Firefox не поддерживает следующие разрешения:
backgroundclipboardReadclipboardWritegeolocationunlimitedStorageObviously, it doesn't support permissions for APIs that are themselves not supported.
Firefox does not support the following incognito (private browsing) modes:
splitsetPopup() are resolved relative to the caller document, rather than to the extension rootsetPopup() are resolved relative to the caller document, rather than to the extension rootimport()export()onCreatedonRemovedonChangedonMovedonChildrenReorderedonImportBeganonImportEndedBookmarkTreeNodeUnmodifiabledrag()acceptDanger()setShelfEnabled()onDeterminingFilenamesaveAs option and values other than "GET" for the method option are not supported by download()setUpdateUrlData()onRequestonRequestExternalgetExtensionTabs()sendRequest()onStateChangedsetDetectionInterval()Additoinally, queryState() always returns "active" in Firefox, regardless of the current system idle state.
update()byUser data.getPackageDirectoryEntry()reload()requestUpdateCheck()restart()sendNativeMessage()onBrowserUpdateAvailableonConnectExternalonInstalledonMessageExternalonRestartRequiredonStartuponSuspendonSuspendCanceledonUpdateAvailablemanaged storage areasync storage areagetBytesInUse().highlighted and active as the same, since Firefox has no concept of selecting multiple tabs.tabs permission if you want to include url in the queryInfo parameter to tabs.query().In Firefox, relative URLs passed into tabs.executeScript() or tabs.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
sendRequest()getSelected()onActiveChangedonHighlightChangedonSelectionChangedonCreatedNavigationTargetonTabReplacedonAuthRequiredwindowId and tabId"requestBody" instruction in opt_extraInfoSpecfocused option in create()onFocusChanged will trigger multiple times for a given focus change.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.
Firefox resolves URLs in injected CSS files relative to the CSS file itself, rather than to the page it's injected into.
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.