From 95aca4b4d8fa62815d4bd412fff1a364f842814a Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 29 Apr 2021 16:16:42 -0700 Subject: remove retired locales (#699) --- files/vi/web/api/childnode/index.html | 78 ---------------------- files/vi/web/api/childnode/remove/index.html | 97 ---------------------------- 2 files changed, 175 deletions(-) delete mode 100644 files/vi/web/api/childnode/index.html delete mode 100644 files/vi/web/api/childnode/remove/index.html (limited to 'files/vi/web/api/childnode') diff --git a/files/vi/web/api/childnode/index.html b/files/vi/web/api/childnode/index.html deleted file mode 100644 index ff71a15d51..0000000000 --- a/files/vi/web/api/childnode/index.html +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: ChildNode -slug: Web/API/ChildNode -tags: - - API - - DOM - - Experimental - - Interface - - NeedsTranslation - - Node - - TopicStub -translation_of: Web/API/ChildNode ---- -
{{APIRef("DOM")}}
- -

The ChildNode interface contains methods that are particular to {{domxref("Node")}} objects that can have a parent.

- -

ChildNode is a raw interface and no object of this type can be created; it is implemented by {{domxref("Element")}}, {{domxref("DocumentType")}}, and {{domxref("CharacterData")}} objects.

- -

Properties

- -

There are neither inherited, nor specific properties.

- -

Methods

- -

There are no inherited methods.

- -
-
{{domxref("ChildNode.remove()")}} {{experimental_inline}}
-
Removes this ChildNode from the children list of its parent.
-
{{domxref("ChildNode.before()")}} {{experimental_inline}}
-
Inserts a set of {{domxref("Node")}} or {{domxref("DOMString")}} objects in the children list of this ChildNode's parent, just before this ChildNode. {{domxref("DOMString")}} objects are inserted as equivalent {{domxref("Text")}} nodes.
-
{{domxref("ChildNode.after()")}} {{experimental_inline}}
-
Inserts a set of {{domxref("Node")}} or {{domxref("DOMString")}} objects in the children list of this ChildNode's parent, just after this ChildNode. {{domxref("DOMString")}} objects are inserted as equivalent {{domxref("Text")}} nodes.
-
{{domxref("ChildNode.replaceWith()")}} {{experimental_inline}}
-
Replaces this ChildNode in the children list of its parent with a set of {{domxref("Node")}} or {{domxref("DOMString")}} objects. {{domxref("DOMString")}} objects are inserted as equivalent {{domxref("Text")}} nodes.
-
- -

Specifications

- - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#interface-childnode', 'ChildNode')}}{{Spec2('DOM WHATWG')}}Split the ElementTraversal interface in {{domxref("ParentNode")}} and ChildNode. previousElementSibling and nextElementSibling are now defined on the latter. The {{domxref("CharacterData")}} and {{domxref("DocumentType")}} implemented the new interfaces. Added the remove(), before(), after() and replaceWith() methods.
{{SpecName('Element Traversal', '#interface-elementTraversal', 'ElementTraversal')}}{{Spec2('Element Traversal')}}Added the initial definition of its properties to the ElementTraversal pure interface and use it on {{domxref("Element")}}.
- -

Polyfill

- -

External on github: childNode.js

- -

Browser compatibility

- - - -

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

- -

See also

- - diff --git a/files/vi/web/api/childnode/remove/index.html b/files/vi/web/api/childnode/remove/index.html deleted file mode 100644 index 3c0fde3e18..0000000000 --- a/files/vi/web/api/childnode/remove/index.html +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: ChildNode.remove() -slug: Web/API/ChildNode/remove -tags: - - API - - ChildNode - - DOM - - Phương Thức - - Đang thử nghiệm -translation_of: Web/API/ChildNode/remove ---- -
{{APIRef("DOM")}}
- -

Phương thức ChildNode.remove() dùng để loại bỏ chính đối tượng gọi nó ra khỏi cây cấu trúc.

- -

Cú pháp

- -
node.remove();
-
- -

Ví dụ

- -

Cách dùng remove()

- -
<div id="div-01">Đây là div-01</div>
-<div id="div-02">Đây là div-02</div>
-<div id="div-03">Đây là div-03</div>
-
- -
var el = document.getElementById('div-02');
-el.remove(); // Gỡ bỏ div có id là 'div-02'
-
- -

ChildNode.remove() is unscopable

- -

The remove() method is not scoped into the with statement. See {{jsxref("Symbol.unscopables")}} for more information.

- -
with(node) {
-  remove();
-}
-// ReferenceError: remove is not defined 
- -

Giải pháp thay thế

- -

Ta có thể thay thế phương thức remove() bằng đoạn mã sau để chạy trên Internet Explorer 9 và những đời sau này:

- -
// Nguồn: https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/remove()/remove().md
-(function (arr) {
-  arr.forEach(function (item) {
-    if (item.hasOwnProperty('remove')) {
-      return;
-    }
-    Object.defineProperty(item, 'remove', {
-      configurable: true,
-      enumerable: true,
-      writable: true,
-      value: function remove() {
-        if (this.parentNode !== null)
-          this.parentNode.removeChild(this);
-      }
-    });
-  });
-})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
- -

Thông số kỹ thuật

- - - - - - - - - - - - - - -
Thông số kỹ thuậtTrạng tháiChú thích
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}Lần đầu được định nghĩa.
- -

Tính tương thích trên trình duyệt

- -
- - -

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

-
- -

Xem thêm

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