Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Chrome との非互換性

この翻訳は不完全です。英語から この記事を翻訳 してください。

WebextensionはChromeExtensionやOperaExtensionと互換性があるように設計されています。可能な限り、それぞれのブラウザ向けに書かれた拡張は最低限の変更でFirefoxで実行できるように設計されています。

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.

この記事ではFirefoxで完全サポート済みや一部サポート済みの機能やAPIのリストが載っています。一部サポート済みのものに関しては、違いも載っています。

ここに乗っていない機能やAPIはまだサポートしていないと想定してください。

manifest.json features

完全互換性ありkeys

一部サポート済みkeys

background

Firefoxは"persistent"プロパティをサポートしていません。バックグラウンドスクリプトは(ページを)ロードした後に残り続けます。

content_scripts

Firefoxは現在サポートしていません:

  • match_about_blank

permissions

Firefox does not yet support the following permissions:

  • background
  • clipboardRead
  • clipboardWrite
  • geolocation
  • nativeMessaging
  • unlimitedStorage

Obviously, it doesn't yet support permissions for APIs that are themselves not supported.

web_accessible_resources

Firefoxはワイルドカード指定をサポートしていません:個々の web accessible resources を全て指定する必要があります。

JavaScript APIs

完全互換性があるAPI

一部サポート済み APIs

bookmarks

  • Firefox does not support:
    • import()
    • export()
    • onCreated
    • onRemoved
    • onChanged
    • onMoved
    • onChildrenReordered
    • onImportBegan
    • onImportEnded
    • BookmarkTreeNodeUnmodifiable
  • Firefox has special bookmarks like "Recently Bookmarked" or "Recently Visited"

cookies

  • onChangedイベントには微妙な違いがあります。
  • Creating session cookies with set might fail
  • getAllCookieStores always just returns one default store and no tabs
  • accessing cookies from private tabs is impossible
  • Host permissions are not currently enforced バグ 1210996

extension

  • Firefox only supports:
    • getBackgroundPage()
    • getURL()
    • inIncognitoContext in content scripts

i18n

  • In the JavaScript API, Firefox currently only supports the getMessage() method.
  • Firefox does not yet localize CSS files (バグ 1209184.

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().
  • The storage API is not supported in content scripts.

tabs

  • Firefox does not support:
    • sendRequest()
    • getSelected()
    • duplicate()
    • highlight()
    • move()
    • detectLanguage()
    • captureVisibleTab()
    • getZoom()
    • setZoom()
    • getZoomSettings()
    • setZoomSettings()
    • The callback argument to executeScript() or insertCSS バグ 1210583.

       

  • Additionally, Firefox currently:
    • Treats highlighted and active as the same, since Firefox has no concept of selecting multiple tabs.
    • Does not enforce host permissions for executeScript() バグ 1193837.

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
  • Responses can be modified only in onHeadersReceived.
  • Filtering by windowId and tabId is not supported.
  • The "requestBody" instruction in opt_extraInfoSpec is not supported.
  • Redirection is not allowed in onBeforeRequest or onHeadersReceived, but is allowed in onBeforeSendHeaders.
  • 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 the focused, type, or state options.
  • update() only supports the focused option.

サポート予定APIs

私たちはまだこれらのAPIをサポートしていませんが、サポートする予定はあります。最新版は英語のページを見てください。

CSS

Localized String Interpolation

We currently do not support interpolation of localized strings __MSG_ tokens in extension CSS files: バグ 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.

その他の非互換性

  • Chrome allows any optional arguments to be omitted, even if followed by other arguments. Firefox currently supports this only under specific circumstances. We recommend only omitting optional arguments at the end of the arguments list, and using null for all other cases.

ドキュメントのタグと貢献者

タグ: 
 このページの貢献者: lv7777, hashedhyphen
 最終更新者: lv7777,