Preferences System:preferences
出典: MDC
目次 |
[編集] 概説
<preferences> は <preference> 要素のためのコンテナ要素です。この要素は <prefpane> 要素の子要素であることが想定されます。
<preferences> 要素は一つ以上の <preference> 要素を含んでいるべきです。
注意: 以下のメソッドとプロパティのうちどれが公開のものであるかは、明らかになっていません。
[編集] XUL構文
<preferences>
<preference id="pref_one" name="extensions.myextension.one" type="bool"/>
<preference id="pref_two" name="extensions.myextension.two" type="string"/>
... などなど ...
</preferences>
[編集] メソッド
-
void fireChangedEvent(in DOMElement preference); - 渡された
preference要素のための(バブリングしない)changedイベントを生成して発行します。また、その要素のonchanged属性で指定されたコードを実行します。<preference> の change イベントの説明も参照してください。 -
void observe(in nsISupports aSubject, in string aTopic, in wstring aData); - nsIObserver のメソッドは、この要素の子要素としてリストされたpreference要素の変更を反映するために、内部的に使用されます。
[編集] フィールド
-
attribute nsIPrefService service; - 設定サービス。
-
attribute nsIPrefBranch rootBranch; - 設定の枝のルート(The root prefs branch)。
-
attribute nsIPrefBranch defaultBranch; - 既定の値を示す、設定のツリーの枝のルート(The root prefs branch of the tree with default values)。
-
attribute nsIPrefBranch2 rootBranchInternal; -
nsIPrefBranch2インターフェイスによる、設定の枝のルート。
設定システムの資料:
- 簡単な紹介: Getting Started | サンプル | トラブルシューティング
- リファレンス: <prefwindow> | <prefpane> | <preferences> | <preference> | 新しい属性