From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/attr/prefix/index.html | 72 +++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 files/ja/web/api/attr/prefix/index.html (limited to 'files/ja/web/api/attr/prefix') diff --git a/files/ja/web/api/attr/prefix/index.html b/files/ja/web/api/attr/prefix/index.html new file mode 100644 index 0000000000..019fd06e0a --- /dev/null +++ b/files/ja/web/api/attr/prefix/index.html @@ -0,0 +1,72 @@ +--- +title: Attr.prefix +slug: Web/API/Attr/prefix +tags: + - API + - DOM + - Property + - Reference +translation_of: Web/API/Attr/prefix +--- +
{{APIRef("DOM")}}
+ +

Attr.prefix という読み取り専用のプロパティは特定の属性の名前空間の接頭辞、もしくは接頭辞の指定がなければ null を返します。

+ +
+

DOM4 以前は この API は {{domxref("Node")}} で定義されていました。

+
+ +

構文

+ +
string = attribute.prefix
+
+ +

+ +

次の例はコンソールに "x" と出力します。

+ +
<div x:id="example" onclick="console.log(this.attributes[0].prefix)"/>
+
+ +

注記

+ +

これは例えば文書が XML の MIME タイプで提供されているといった名前空間を認識するパーサーを使用した場合だけ動作します。これは HTML 文書では動作しません。

+ +

仕様

+ + + + + + + + + + + + + + + + + + + + + +
仕様ステータスコメント
{{SpecName('DOM WHATWG', '#dom-attr-prefix', 'Attr: prefix')}}{{Spec2('DOM WHATWG')}}
{{SpecName("DOM4", "#dom-attr-prefix", "Attr.prefix")}}{{Spec2("DOM4")}}
+ +

ブラウザの実装状況

+ + + +

{{Compat("api.Attr.prefix")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf