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 --- .../components.interfaces/index.html | 37 ---------------------- 1 file changed, 37 deletions(-) delete mode 100644 files/ja/mozilla/tech/xpcom/language_bindings/components.interfaces/index.html (limited to 'files/ja/mozilla/tech/xpcom/language_bindings/components.interfaces') diff --git a/files/ja/mozilla/tech/xpcom/language_bindings/components.interfaces/index.html b/files/ja/mozilla/tech/xpcom/language_bindings/components.interfaces/index.html deleted file mode 100644 index 8105f7f239..0000000000 --- a/files/ja/mozilla/tech/xpcom/language_bindings/components.interfaces/index.html +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: Components.interfaces -slug: Mozilla/Tech/XPCOM/Language_Bindings/Components.interfaces -tags: - - 'XPCOM:Language Bindings' - - XPConnect -translation_of: Mozilla/Tech/XPCOM/Language_Bindings/Components.interfaces ---- -

-

Components.interfaces は、プロパティがそれらの名前によって索引付けされたクラスである、読み出し専用オブジェクトです。 -

-

はじめに

-

Components.interfaces は、nsIJSCID インターフェースを実装した読み出し専用オブジェクトです。それぞれのオブジェクトは、いくつかのコンポーネントが実装している (あるいは未実装の可能性もあります) XPCOM インターフェースのひとつを表します。 -


-対応する .idl の宣言が [scriptable] として設計されたインターフェースのみを反映します。つまり、XPConnect が JavaScript へ反映することのできるインターフェースということです。 -

Components.interfaces オブジェクトのプロパティは、nsID nsID 型のパラメータを除いた XPCOM メソッドで利用されます。これには nsISupports::QueryInterfacensICID::getService が受け取る追加パラメータ、nsICID::createInstance (JavaScript から呼ばれた場合)、nsIClassInfo::getInterfaces が含まれます。 -

Components.interfaces オブジェクトのプロパティは for...in ループを使って列挙できます。 -

-

使い方

-

インターフェースオブジェクトへのアクセス

-

Components.interfaces オブジェクトのプロパティはインターフェース名で索引付けされます。インターフェースオブジェクトは以下のようにして取得できます。 -

-
var iface = Components.interfaces.nsISupportsArray;
-
-

この戻り値は nsISupportsArray インターフェースのインターフェースオブジェクトです。 -

-

インターフェースで定義されたコンスタントへのアクセス

-

Interface descriptions (cf. XPIDL) may not only contain method declarations, but also constants. For example, assume we have the following interface declaration: -

-
interface nsIFoo : nsISupports {
-  const PRUint32 MYFLAG = 5;
-};
-
-

The constant MYFLAG can then be accessed using -

-
var myFlag = Components.interfaces.nsIFoo.MYFLAG;
-
-- cgit v1.2.3-54-g00ecf