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.

bootstrap.js

bootstrap.js スクリプトにはいくつかの特定の関数を含める必要があります。それらは拡張機能を管理するブラウザによって呼び出されます。このスクリプトは特権付きサンドボックス内で実行され、拡張機能の終了時までキャッシュされます。詳しくは ブートストラップ型拡張機能 を参照してください。

以下の例には必要な関数が vsdoc 形式で含まれています。

function startup(data, reason) {
    /// <summary>
    /// ブートストラップデータ構造 @see https://developer.mozilla.org/ja/docs/Extensions/Bootstrapped_extensions#Bootstrap_data
    /// &#10;  string id
    /// &#10;  string version
    /// &#10;  nsIFile installPath
    /// &#10;  nsIURI resourceURI
    /// &#10;
    /// 理由の種類:
    /// &#10;  APP_STARTUP
    /// &#10;  ADDON_ENABLE
    /// &#10;  ADDON_INSTALL
    /// &#10;  ADDON_UPGRADE
    /// &#10;  ADDON_DOWNGRADE
    /// </summary>
}
function shutdown(data, reason) {
    /// <summary>
    /// ブートストラップデータ構造 @see https://developer.mozilla.org/ja/docs/Extensions/Bootstrapped_extensions#Bootstrap_data
    /// &#10;  string id
    /// &#10;  string version
    /// &#10;  nsIFile installPath
    /// &#10;  nsIURI resourceURI
    /// &#10;
    /// 理由の種類:
    /// &#10;  APP_SHUTDOWN
    /// &#10;  ADDON_DISABLE
    /// &#10;  ADDON_UNINSTALL
    /// &#10;  ADDON_UPGRADE
    /// &#10;  ADDON_DOWNGRADE
    /// </summary>
}
function install(data, reason) {
    /// <summary>
    /// ブートストラップデータ構造 @see https://developer.mozilla.org/ja/docs/Extensions/Bootstrapped_extensions#Bootstrap_data
    /// &#10;  string id
    /// &#10;  string version
    /// &#10;  nsIFile installPath
    /// &#10;  nsIURI resourceURI
    /// &#10;
    /// 理由の種類:
    /// &#10;  ADDON_INSTALL
    /// &#10;  ADDON_UPGRADE
    /// &#10;  ADDON_DOWNGRADE
    /// </summary>
}
function uninstall(data, reason) {
    /// <summary>
    /// ブートストラップデータ構造 @see https://developer.mozilla.org/ja/docs/Extensions/Bootstrapped_extensions#Bootstrap_data
    /// &#10;  string id
    /// &#10;  string version
    /// &#10;  nsIFile installPath
    /// &#10;  nsIURI resourceURI
    /// &#10;
    /// 理由の種類:
    /// &#10;  ADDON_UNINSTALL
    /// &#10;  ADDON_UPGRADE
    /// &#10;  ADDON_DOWNGRADE
    /// </summary>
}

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

 このページの貢献者: kohei.yoshino
 最終更新者: kohei.yoshino,