From a065e04d529da1d847b5062a12c46d916408bf32 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 21:46:22 -0500 Subject: update based on https://github.com/mdn/yari/issues/2028 --- .../ja/toolkit_api/extipreferencebranch/index.html | 146 --------------------- 1 file changed, 146 deletions(-) delete mode 100644 files/ja/toolkit_api/extipreferencebranch/index.html (limited to 'files/ja/toolkit_api/extipreferencebranch') diff --git a/files/ja/toolkit_api/extipreferencebranch/index.html b/files/ja/toolkit_api/extipreferencebranch/index.html deleted file mode 100644 index 42f4c97886..0000000000 --- a/files/ja/toolkit_api/extipreferencebranch/index.html +++ /dev/null @@ -1,146 +0,0 @@ ---- -title: extIPreferenceBranch -slug: Toolkit_API/extIPreferenceBranch -tags: - - FUEL - - Interfaces - - SMILE - - STEEL - - XPCOM - - XPCOM API Reference -translation_of: Mozilla/Tech/Toolkit_API/extIPreferenceBranch ---- -

-

-

この記事は Thunderbird 3 の新機能について述べています

-

-

extIPreferenceBranch インタフェースは、設定への簡単なアクセスを提供します。このインタフェースは予め定義されたルート設定ブランチを持っています。ルートブランチは、オーナーのコンテキストを基にセットされます。例えば、アプリケーションレベルの設定はルートが空であるため、拡張機能は設定のルートとして "extensions.extensionid." を持ちます。このインタフェースで使用されるすべての設定の "aName" 引数は、ルートブランチからの相対的な名前になります。extIPreferenceBranchtoolkit/components/exthelper/extIApplication.idl で定義されています。

-

XPCOM サービスを通して実装された extIApplication: FUEL (Firefox) または STEEL (Thunderbird), SMILE (SeaMonkey) のページの説明を参照してください。

-

メソッドの概要

- - - - - - - - - - - - - - - - - - -
boolean has(in AString aName)
extIPreference get(in AString aName)
nsIVariant getValue(in AString aName, in nsIVariant aDefaultValue)
void setValue(in AString aName, in nsIVariant aValue)
void reset()
-

プロパティ

- - - - - - - - - - - - - - - - - - - - - - - -
プロパティ説明
rootreadonly attribute AStringブランチのルートの名前。
allreadonly attribute nsIVariantこのブランチ内のすべての設定を列挙した extIPreference の配列。
eventsreadonly attribute extIEvents(【訳注: ブランチ内のすべての】) 設定のイベントオブジェクト。"change" をサポート。
-

メソッド

-

has()

-

ある設定が存在するかどうかを調べる。

-
boolean has(in AString aName)
-
-
引数
-
-
- aName
-
- 設定の名前。
-
-
戻り値
-

設定が存在する場合は true、存在しない場合は false

-

get()

-

ある設定を表すオブジェクトを取得する。

-
extIPreference get(in AString aName)
-
-
引数
-
-
- aName
-
- 設定の名前。
-
-
戻り値
-

設定オブジェクト、または設定が存在しなければ null

-

getValue()

-

ある設定の値を取得する。設定が存在しない場合はデフォルト値を返す。

-
nsIVariant getValue(in AString aName, in nsIVariant aDefaultValue)
-
-
引数
-
-
- aName
-
- 設定の名前。
-
- aDefaultValue
-
- 設定のデフォルト値。これは、何の処理もされずに渡され、値の型は設定として正しくない型にもなります。例えば、null/undefined/object になります。
-
-
戻り値
-

設定の値。設定が存在しない場合はデフォルト値。異なる型の戻り値を使用することは、JavaScript コードに設定ファイルで使用されたものと同じ型の値を使用させることを意味するため、型の強制は起こらないでしょう。設定ファイル内の引用符で囲まれた文字列は、値が "true" や "false" の文字列であっても文字列型として扱われます。整数型の設定は JavaScript の Number 型として扱われます。真偽値は JavaScript の Boolean 型として扱われます。設定サブシステムでは、これ以外の型はサポートされていません。

-

setValue()

-

設定の値を指定した値に変更する。

-
void setValue(in AString aName, in nsIVariant aValue)
-
-
引数
-
-
- aName
-
- 設定の名前。
-
- aValue
-
- 設定の値。
-
-
戻り値
-

 

-

reset()

-

ブランチ内のすべての設定をデフォルト値にリセットする。

-
- 注記: この関数は未実装であるため例外が発生します。bug 481044 を参照してください。
-
void reset()
-
-
引数
-
戻り値
-

-
var myExt = Application.extensions.get('myapplicationid');
-
-function myFunc (event) {
-  Application.console.log('change!');
-};
-
-myExt.prefs.get("myprefname").events.addListener("change", myFunc);
-
-

参照

-

FUEL (Firefox), STEEL (Thunderbird), SMILE (SeaMonkey)

-

既知の問題

-

Bug 488587 - Function registered as FUEL preference listener not always called

-

-- cgit v1.2.3-54-g00ecf