Visit Mozilla.org

nsIContentPrefObserver

出典: MDC

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

nsIContentPrefObserver インタフェースは、コンテンツ設定項目の値に対する変更を容易に監視できるようにします。

目次

nsIContentPrefObservertoolkit/components/contentprefs/public/nsIContentPrefService.idl で定義されています。これは scriptable非凍結です。 (Mozilla 1.9から更新されていません)

継承元: nsISupports

[編集] メソッドの概要

void onContentPrefSet(in AString aGroup, in AString aName, in nsIVariant aValue);
void onContentPrefRemoved(in AString aGroup, in AString aName);

[編集] メソッド

[編集] onContentPrefSet()

設定項目の値が変更されたときに呼び出されます。(既存の設定項目の値が変更されたときと、新しい設定項目が作成されたときのいずれも)

 void onContentPrefSet(
   in AString aGroup,
   in AString aName,
   in nsIVariant aValue
 );
[編集] 引数
aGroup
設定項目が属するグループ。これは Web サイトの URI になります。設定項目がグローバルで、すべての Web サイトに適用される場合、この値は null となります。
aName
値が変更された設定項目の名前。
aValue
設定項目の新しい値。

[編集] onContentPrefRemoved()

設定項目が削除されたときに呼び出されます。

 void onContentPrefSet(
   in AString aGroup,
   in AString aName
 );
[編集] 引数
aGroup
設定項目が属するグループ。これは Web サイトの URI になります。設定項目がグローバルで、すべての Web サイトに適用される場合、この値は null となります。
aName
削除された設定項目の名前。

[編集] 関連記事

nsIContentPrefService, Using content preferences