From 2d478fb11c4864129dffb10cb43630b2aaf26bc0 Mon Sep 17 00:00:00 2001 From: MDN Date: Tue, 29 Jun 2021 00:35:05 +0000 Subject: [CRON] sync translated content --- files/ja/_redirects.txt | 1 + files/ja/_wikihistory.json | 16 +- .../ja/orphaned/web/api/childnode/after/index.html | 185 +++++++++++++++++++++ files/ja/web/api/childnode/after/index.html | 184 -------------------- 4 files changed, 194 insertions(+), 192 deletions(-) create mode 100644 files/ja/orphaned/web/api/childnode/after/index.html delete mode 100644 files/ja/web/api/childnode/after/index.html (limited to 'files/ja') diff --git a/files/ja/_redirects.txt b/files/ja/_redirects.txt index 7003c6aaed..86f53f55f0 100644 --- a/files/ja/_redirects.txt +++ b/files/ja/_redirects.txt @@ -3726,6 +3726,7 @@ /ja/docs/Web/API/CanvasRenderingContext2D.drawFocusIfNeeded /ja/docs/Web/API/CanvasRenderingContext2D/drawFocusIfNeeded /ja/docs/Web/API/CanvasRenderingContext2D.removeHitRegion /ja/docs/Web/API/CanvasRenderingContext2D/removeHitRegion /ja/docs/Web/API/Canvas_API/Drawing_graphics_with_canvas /ja/docs/Web/API/Canvas_API/Tutorial +/ja/docs/Web/API/ChildNode/after /ja/docs/orphaned/Web/API/ChildNode/after /ja/docs/Web/API/ChildNode/remove /ja/docs/orphaned/Web/API/ChildNode/remove /ja/docs/Web/API/ChildNode/replaceWith /ja/docs/orphaned/Web/API/ChildNode/replaceWith /ja/docs/Web/API/Console.error /ja/docs/Web/API/Console/error diff --git a/files/ja/_wikihistory.json b/files/ja/_wikihistory.json index 00c5e43e3d..4028537bb6 100644 --- a/files/ja/_wikihistory.json +++ b/files/ja/_wikihistory.json @@ -11605,14 +11605,6 @@ "momoi" ] }, - "Web/API/ChildNode/after": { - "modified": "2020-10-17T21:33:51.563Z", - "contributors": [ - "dskmori", - "Potappo", - "Shirasu" - ] - }, "Web/API/ChildNode/before": { "modified": "2020-10-17T03:58:22.731Z", "contributors": [ @@ -51810,6 +51802,14 @@ "maruhiro" ] }, + "orphaned/Web/API/ChildNode/after": { + "modified": "2020-10-17T21:33:51.563Z", + "contributors": [ + "dskmori", + "Potappo", + "Shirasu" + ] + }, "orphaned/Web/API/ChildNode/remove": { "modified": "2020-10-15T21:51:39.796Z", "contributors": [ diff --git a/files/ja/orphaned/web/api/childnode/after/index.html b/files/ja/orphaned/web/api/childnode/after/index.html new file mode 100644 index 0000000000..837ab99d5e --- /dev/null +++ b/files/ja/orphaned/web/api/childnode/after/index.html @@ -0,0 +1,185 @@ +--- +title: ChildNode.after() +slug: orphaned/Web/API/ChildNode/after +tags: + - API + - DOM + - Method + - Node + - Reference +translation_of: Web/API/ChildNode/after +original_slug: Web/API/ChildNode/after +--- +
{{APIRef("DOM")}}
+ +

ChildNode.after() は、ChildNode の親の子リストの、ChildNode の直後に、 {{domxref("Node")}} または {{domxref("DOMString")}} オブジェクトのセットを挿入します。 {{domxref("DOMString")}} オブジェクトは {{domxref("Text")}} ノードと等価なノードとして挿入されます。

+ +

構文

+ +
[Throws, Unscopable]
+void ChildNode.after((Node or DOMString)... nodes);
+
+ +

パラメーター

+ +
+
nodes
+
{{domxref("Node")}} または {{domxref("DOMString")}} オブジェクトのセットを挿入します。
+
+ +

例外

+ + + +

+ +

要素の挿入

+ +
var parent = document.createElement("div");
+var child = document.createElement("p");
+parent.appendChild(child);
+var span = document.createElement("span");
+
+child.after(span);
+
+console.log(parent.outerHTML);
+// "<div><p></p><span></span></div>"
+
+ +

テキストの挿入

+ +
var parent = document.createElement("div");
+var child = document.createElement("p");
+parent.appendChild(child);
+
+child.after("Text");
+
+console.log(parent.outerHTML);
+// "<div><p></p>Text</div>"
+ +

要素とテキストの挿入

+ +
var parent = document.createElement("div");
+var child = document.createElement("p");
+parent.appendChild(child);
+var span = document.createElement("span");
+
+child.after(span, "Text");
+
+console.log(parent.outerHTML);
+// "<div><p></p><span></span>Text</div>"
+ +

ChildNode.after() はスコーピングに非対応

+ +

after() メソッドは with 文でのスコーピングに対応していません。詳細は {{jsxref("Symbol.unscopables")}} をご覧ください。

+ +
with(node) {
+  after("foo");
+}
+// ReferenceError: after is not defined 
+ +

ポリフィル

+ +

以下のポリフィルで、Internet Explorer 9 以降でも after() メソッドが利用できます。

+ +
// from: https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/after()/after().md
+(function (arr) {
+  arr.forEach(function (item) {
+    if (item.hasOwnProperty('after')) {
+      return;
+    }
+    Object.defineProperty(item, 'after', {
+      configurable: true,
+      enumerable: true,
+      writable: true,
+      value: function after() {
+        var argArr = Array.prototype.slice.call(arguments),
+          docFrag = document.createDocumentFragment();
+
+        argArr.forEach(function (argItem) {
+          var isNode = argItem instanceof Node;
+          docFrag.appendChild(isNode ? argItem : document.createTextNode(String(argItem)));
+        });
+
+        this.parentNode.insertBefore(docFrag, this.nextSibling);
+      }
+    });
+  });
+})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
+ +

別のポリフィル

+ +
// from: https://github.com/FabioVergani/js-Polyfill_Element.prototype.after/blob/master/after.js
+
+(function(x){
+ var o=x.prototype,p='after';
+ if(!o[p]){
+    o[p]=function(){
+     var e, m=arguments, l=m.length, i=0, t=this, p=t.parentNode, n=Node, s=String, d=document;
+     if(p!==null){
+        while(i<l){
+         e=m[i];
+         if(e instanceof n){
+            t=t.nextSibling;
+            if(t!==null){
+                p.insertBefore(e,t);
+            }else{
+                p.appendChild(e);
+            };
+         }else{
+            p.appendChild(d.createTextNode(s(e)));
+         };
+         ++i;
+        };
+     };
+    };
+ };
+})(Element);
+
+
+
+/*
+minified:
+
+(function(x){
+ var o=x.prototype;
+ o.after||(o.after=function(){var e,m=arguments,l=m.length,i=0,t=this,p=t.parentNode,n=Node,s=String,d=document;if(p!==null){while(i<l){((e=m[i]) instanceof n)?(((t=t.nextSibling )!==null)?p.insertBefore(e,t):p.appendChild(e)):p.appendChild(d.createTextNode(s(e)));++i;}}});
+}(Element));
+*/
+
+ +

仕様

+ + + + + + + + + + + + + + +
仕様書策定状況コメント
{{SpecName('DOM WHATWG', '#dom-childnode-after', 'ChildNode.after()')}}{{Spec2('DOM WHATWG')}}初期定義
+ +

ブラウザー実装状況

+ + + +

{{Compat("api.ChildNode.after")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/childnode/after/index.html b/files/ja/web/api/childnode/after/index.html deleted file mode 100644 index 8f29bb44f3..0000000000 --- a/files/ja/web/api/childnode/after/index.html +++ /dev/null @@ -1,184 +0,0 @@ ---- -title: ChildNode.after() -slug: Web/API/ChildNode/after -tags: - - API - - DOM - - Method - - Node - - Reference -translation_of: Web/API/ChildNode/after ---- -
{{APIRef("DOM")}}
- -

ChildNode.after() は、ChildNode の親の子リストの、ChildNode の直後に、 {{domxref("Node")}} または {{domxref("DOMString")}} オブジェクトのセットを挿入します。 {{domxref("DOMString")}} オブジェクトは {{domxref("Text")}} ノードと等価なノードとして挿入されます。

- -

構文

- -
[Throws, Unscopable]
-void ChildNode.after((Node or DOMString)... nodes);
-
- -

パラメーター

- -
-
nodes
-
{{domxref("Node")}} または {{domxref("DOMString")}} オブジェクトのセットを挿入します。
-
- -

例外

- - - -

- -

要素の挿入

- -
var parent = document.createElement("div");
-var child = document.createElement("p");
-parent.appendChild(child);
-var span = document.createElement("span");
-
-child.after(span);
-
-console.log(parent.outerHTML);
-// "<div><p></p><span></span></div>"
-
- -

テキストの挿入

- -
var parent = document.createElement("div");
-var child = document.createElement("p");
-parent.appendChild(child);
-
-child.after("Text");
-
-console.log(parent.outerHTML);
-// "<div><p></p>Text</div>"
- -

要素とテキストの挿入

- -
var parent = document.createElement("div");
-var child = document.createElement("p");
-parent.appendChild(child);
-var span = document.createElement("span");
-
-child.after(span, "Text");
-
-console.log(parent.outerHTML);
-// "<div><p></p><span></span>Text</div>"
- -

ChildNode.after() はスコーピングに非対応

- -

after() メソッドは with 文でのスコーピングに対応していません。詳細は {{jsxref("Symbol.unscopables")}} をご覧ください。

- -
with(node) {
-  after("foo");
-}
-// ReferenceError: after is not defined 
- -

ポリフィル

- -

以下のポリフィルで、Internet Explorer 9 以降でも after() メソッドが利用できます。

- -
// from: https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/after()/after().md
-(function (arr) {
-  arr.forEach(function (item) {
-    if (item.hasOwnProperty('after')) {
-      return;
-    }
-    Object.defineProperty(item, 'after', {
-      configurable: true,
-      enumerable: true,
-      writable: true,
-      value: function after() {
-        var argArr = Array.prototype.slice.call(arguments),
-          docFrag = document.createDocumentFragment();
-
-        argArr.forEach(function (argItem) {
-          var isNode = argItem instanceof Node;
-          docFrag.appendChild(isNode ? argItem : document.createTextNode(String(argItem)));
-        });
-
-        this.parentNode.insertBefore(docFrag, this.nextSibling);
-      }
-    });
-  });
-})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
- -

別のポリフィル

- -
// from: https://github.com/FabioVergani/js-Polyfill_Element.prototype.after/blob/master/after.js
-
-(function(x){
- var o=x.prototype,p='after';
- if(!o[p]){
-    o[p]=function(){
-     var e, m=arguments, l=m.length, i=0, t=this, p=t.parentNode, n=Node, s=String, d=document;
-     if(p!==null){
-        while(i<l){
-         e=m[i];
-         if(e instanceof n){
-            t=t.nextSibling;
-            if(t!==null){
-                p.insertBefore(e,t);
-            }else{
-                p.appendChild(e);
-            };
-         }else{
-            p.appendChild(d.createTextNode(s(e)));
-         };
-         ++i;
-        };
-     };
-    };
- };
-})(Element);
-
-
-
-/*
-minified:
-
-(function(x){
- var o=x.prototype;
- o.after||(o.after=function(){var e,m=arguments,l=m.length,i=0,t=this,p=t.parentNode,n=Node,s=String,d=document;if(p!==null){while(i<l){((e=m[i]) instanceof n)?(((t=t.nextSibling )!==null)?p.insertBefore(e,t):p.appendChild(e)):p.appendChild(d.createTextNode(s(e)));++i;}}});
-}(Element));
-*/
-
- -

仕様

- - - - - - - - - - - - - - -
仕様書策定状況コメント
{{SpecName('DOM WHATWG', '#dom-childnode-after', 'ChildNode.after()')}}{{Spec2('DOM WHATWG')}}初期定義
- -

ブラウザー実装状況

- - - -

{{Compat("api.ChildNode.after")}}

- -

関連情報

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