From 8d7ad7715e19a445def22de6d5f3d9519cebe69e Mon Sep 17 00:00:00 2001 From: MDN Date: Wed, 24 Mar 2021 00:27:57 +0000 Subject: [CRON] sync translated content --- .../web/api/element/localname/index.html | 63 ++++++++++++++++++++++ .../conflicting/web/api/element/prefix/index.html | 52 ++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 files/ja/conflicting/web/api/element/localname/index.html create mode 100644 files/ja/conflicting/web/api/element/prefix/index.html (limited to 'files/ja/conflicting') diff --git a/files/ja/conflicting/web/api/element/localname/index.html b/files/ja/conflicting/web/api/element/localname/index.html new file mode 100644 index 0000000000..e8849609d9 --- /dev/null +++ b/files/ja/conflicting/web/api/element/localname/index.html @@ -0,0 +1,63 @@ +--- +title: Node.localName +slug: conflicting/Web/API/Element/localName +tags: + - DOM + - Gecko + - Gecko DOM Reference + - Node + - 要更新 +translation_of: Web/API/Node/localName +original_slug: Web/API/Node/localName +--- +

{{ ApiRef() }}

+

概要

+

このノードの修飾名のローカル部分を返します。

+

構文

+
name = element.localName
+
+ +

+

(text/xmlapplication/xhtml+xml のような XML コンテンツタイプで提供されなくてはなりません。)

+
<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:svg="http://www.w3.org/2000/svg">
+<head>
+  <script type="application/javascript"><![CDATA[
+  function test() {
+    var text = document.getElementById('text');
+    var circle = document.getElementById('circle');
+
+    text.value = "<svg:circle> has:\n" +
+                 "localName = '" + circle.localName + "'\n" +
+                 "namespaceURI = '" + circle.namespaceURI + "'";
+  }
+  ]]></script>
+</head>
+<body onload="test()">
+  <svg:svg version="1.1"
+    width="100px" height="100px"
+    viewBox="0 0 100 100">
+    <svg:circle cx="50" cy="50" r="30" style="fill:#aaa" id="circle"/>
+  </svg:svg>
+  <textarea id="text" rows="4" cols="55"/>
+</body>
+</html>
+
+

注記

+

ノードのローカル名はノードの修飾名のコロン(:)の後ろの部分です。修飾名は特定の XML 文書の名前空間の一部として XML の中で特に使われます。例えば、修飾名 ecomm:partners の中で partners がローカル名で ecomm が接頭辞です。

+
<ecomm:business id="soda_shop" type="brick_n_mortar">
+  <ecomm:partners>
+    <ecomm:partner id="1001">Tony's Syrup Warehouse
+    </ecomm:partner>
+  </ecomm:partner>
+</ecomm:business>
+
+

Needs to be reworded; right now it's wrong. -Nickolay The prefix&mdash;in this case, "ecomm"&mdash;defines the namespace in which the local name can be used.

+

 {{ gecko_minversion_note("1.9.2", "Firefox 3.5 およびそれ以前では、このプロパティは HTML DOM 中の HTML 要素については大文字のローカル名を返します(XML DOM 中の XHTML 要素については小文字のローカル名を返します)。 Firefox 3.6 以降のバージョンでは、 HTML 5 との互換性のため、内部的な DOM ストレージにおける大文字/小文字で返します。つまり、 HTML DOM と XML DOM の両方において、 HTML 要素は小文字のローカル名となります。 tagName プロパティは、 HTML DOM 中の HTML 要素についても今まで通り大文字のローカル名を返します。") }}

+

ELEMENT_NODEATTRIBUTE_NODE 以外の種類全てに属すノードでは、常に localNamenull です。

+

参照

+

element.namespaceURI

+

仕様

+

DOM Level 2 Core: Node.localName

diff --git a/files/ja/conflicting/web/api/element/prefix/index.html b/files/ja/conflicting/web/api/element/prefix/index.html new file mode 100644 index 0000000000..1b31545519 --- /dev/null +++ b/files/ja/conflicting/web/api/element/prefix/index.html @@ -0,0 +1,52 @@ +--- +title: Node.prefix +slug: conflicting/Web/API/Element/prefix +tags: + - DOM + - Gecko + - Node +translation_of: Web/API/Node/prefix +original_slug: Web/API/Node/prefix +--- +
{{ApiRef}}
+ +

概要

+ +

prefix は、特定のノードの名前空間の 接頭辞 (prefix) を返します。接頭辞がなければ null を返します。

+ +

構文

+ +
string = element.prefix
+
+ +

+ +

次の例は "x" をアラート表示します。

+ +
<x:div onclick="alert(this.prefix)"/>
+
+ +

注記

+ +

これは、名前空間を解するパーサを使っている場合(つまり、文書が XML mime 型の場合など)にのみ機能します。HTML 文書では機能しません。

+ +

仕様書

+ + + +

ブラウザ実装状況

+ + + +

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

+ +

関連情報

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