diff options
author | MDN <actions@users.noreply.github.com> | 2021-06-30 00:38:38 +0000 |
---|---|---|
committer | MDN <actions@users.noreply.github.com> | 2021-06-30 00:38:38 +0000 |
commit | c98a9b1cf02d9143cc6924f1991d600c0f807411 (patch) | |
tree | f42fa9c2dada7edef3ad108024fb9dc68e3c13de /files/ko/web/api/childnode | |
parent | e189146261073bc1cfb436698e3febd15e09cab4 (diff) | |
download | translated-content-c98a9b1cf02d9143cc6924f1991d600c0f807411.tar.gz translated-content-c98a9b1cf02d9143cc6924f1991d600c0f807411.tar.bz2 translated-content-c98a9b1cf02d9143cc6924f1991d600c0f807411.zip |
[CRON] sync translated content
Diffstat (limited to 'files/ko/web/api/childnode')
-rw-r--r-- | files/ko/web/api/childnode/before/index.html | 144 | ||||
-rw-r--r-- | files/ko/web/api/childnode/index.html | 76 |
2 files changed, 0 insertions, 220 deletions
diff --git a/files/ko/web/api/childnode/before/index.html b/files/ko/web/api/childnode/before/index.html deleted file mode 100644 index 8481f44374..0000000000 --- a/files/ko/web/api/childnode/before/index.html +++ /dev/null @@ -1,144 +0,0 @@ ---- -title: ChildNode.before() -slug: Web/API/ChildNode/before -tags: - - API - - DOM - - 노드 - - 레퍼런스 - - 메소드 - - 실험중 -translation_of: Web/API/ChildNode/before ---- -<div>{{APIRef("DOM")}} {{SeeCompatTable}}</div> - -<p><code><strong>ChildNode.before</strong></code> 메소드는 <code>ChildNode</code> 의 부모가 가진 자식의 <code>ChildNode</code> 바로 이전에 {{domxref("Node")}} 또는 {{domxref("DOMString")}} 객체의 집합을 삽입합니다.{{domxref("DOMString")}} 객체는 {{domxref("Text")}} 노드와 동일하게 삽입됩니다.</p> - -<h2 id="문법">문법</h2> - -<pre class="syntaxbox">[Throws, Unscopable] -void ChildNode.before((Node or DOMString)... nodes); -</pre> - -<h3 id="파라미터">파라미터</h3> - -<dl> - <dt><code>nodes</code></dt> - <dd>삽입할 {{domxref("Node")}} 또는 {{domxref("DOMString")}} 객체의 집합입니다.</dd> -</dl> - -<h3 id="예외">예외</h3> - -<ul> - <li>{{domxref("HierarchyRequestError")}}: 노드는 계층 구조의 특정 지점에 삽입될 수 없습니다.</li> -</ul> - -<h2 id="예제">예제</h2> - -<h3 id="엘리먼트_삽입하기">엘리먼트 삽입하기</h3> - -<pre class="brush: js">var parent = document.createElement("div"); -var child = document.createElement("p"); -parent.appendChild(child); -var span = document.createElement("span"); - -child.before(span); - -console.log(parent.outerHTML); -// "<div><span></span><p></p></div>" -</pre> - -<h3 id="텍스트_삽입하기">텍스트 삽입하기</h3> - -<pre class="brush: js">var parent = document.createElement("div"); -var child = document.createElement("p"); -parent.appendChild(child); - -child.before("Text"); - -console.log(parent.outerHTML); -// "<div>Text<p></p></div>"</pre> - -<h3 id="엘리먼트와_텍스트_삽입하기">엘리먼트와 텍스트 삽입하기</h3> - -<pre class="brush: js">var parent = document.createElement("div"); -var child = document.createElement("p"); -parent.appendChild(child); -var span = document.createElement("span"); - -child.before(span, "Text"); - -console.log(parent.outerHTML); -// "<div><span></span>Text<p></p></div>"</pre> - -<h3 id="ChildNode.before()_는_범위를_지정할_수_없습니다"><code>ChildNode.before()</code> 는 범위를 지정할 수 없습니다</h3> - -<p><code>before()</code> 메소드는 <code>with</code> 구문으로 범위를 지정할 수 없습니다. 자세한 내용은 {{jsxref("Symbol.unscopables")}} 문서를 확인하세요.</p> - -<pre class="brush: js">with(node) { - before("foo"); -} -// ReferenceError: before is not defined </pre> - -<h2 id="폴리필">폴리필</h2> - -<p>다음 코드를 사용해 인터넷 익스플로러 9 이상에서 <code>before() 메소드</code> 를 폴리필링할 수 있습니다.</p> - -<pre class="brush: js">// from: https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/before()/before().md -(function (arr) { - arr.forEach(function (item) { - if (item.hasOwnProperty('before')) { - return; - } - Object.defineProperty(item, 'before', { - configurable: true, - enumerable: true, - writable: true, - value: function before() { - 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); - } - }); - }); -})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);</pre> - -<h2 id="명세">명세</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">명세</th> - <th scope="col">상태</th> - <th scope="col">코멘트</th> - </tr> - <tr> - <td>{{SpecName('DOM WHATWG', '#dom-childnode-before', 'ChildNode.before()')}}</td> - <td>{{Spec2('DOM WHATWG')}}</td> - <td>초기 정의.</td> - </tr> - </tbody> -</table> - -<h2 id="브라우저_호환성">브라우저 호환성</h2> - - - -<p>{{Compat("api.ChildNode.before")}}</p> - -<h2 id="함께_보기">함께 보기</h2> - -<ul> - <li>{{domxref("ChildNode")}} 와 {{domxref("ParentNode")}}</li> - <li>{{domxref("ChildNode.after()")}}</li> - <li>{{domxref("ParentNode.append()")}}</li> - <li>{{domxref("Node.appendChild()")}}</li> - <li>{{domxref("Node.insertBefore()")}}</li> - <li>{{domxref("NodeList")}}</li> -</ul> diff --git a/files/ko/web/api/childnode/index.html b/files/ko/web/api/childnode/index.html deleted file mode 100644 index 2d48b7ef8c..0000000000 --- a/files/ko/web/api/childnode/index.html +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: ChildNode -slug: Web/API/ChildNode -tags: - - API - - DOM - - 노드 - - 실험중 - - 인터페이스 -translation_of: Web/API/ChildNode ---- -<div>{{APIRef("DOM")}}</div> - -<p><code><strong>ChildNode</strong></code> 인터페이스는 부모를 가질 수 있는 {{domxref("Node")}} 객체에 고유한 메소드를 포함합니다.</p> - -<p><code>ChildNode</code>는 원시 인터페이스이며 이 타입의 객체는 생성할 수 없습니다. 이는 {{domxref("Element")}}, {{domxref("DocumentType")}} 및 {{domxref("CharacterData")}} 객체로 구현되었습니다.</p> - -<h2 id="프로퍼티">프로퍼티</h2> - -<p><em>상속 및 특정 프로퍼티가 없습니다.</em></p> - -<h2 id="메소드">메소드</h2> - -<p><em>상속된 메소드가 없습니다.</em></p> - -<dl> - <dt>{{domxref("ChildNode.remove()")}} {{experimental_inline}}</dt> - <dd><code>ChildNode</code>를 부모의 자식 목록으로부터 제거합니다.</dd> - <dt>{{domxref("ChildNode.before()")}} {{experimental_inline}}</dt> - <dd>{{domxref("Node")}} 또는 {{domxref("DOMString")}} 객체의 집합을 부모의 자식 목록에서 <code>ChildNode</code>의 바로 앞에 삽입합니다. {{domxref("DOMString")}} 객체는 {{domxref("Text")}} 노드와 동일하게 삽입됩니다.</dd> - <dt>{{domxref("ChildNode.after()")}} {{experimental_inline}}</dt> - <dd>{{domxref("Node")}} 또는 {{domxref("DOMString")}} 객체의 집합을 부모의 자식 목록에서 <code>ChildNode</code>의 바로 뒤에 삽입합니다. {{domxref("DOMString")}} 객체는 {{domxref("Text")}} 노드와 동일하게 삽입됩니다.</dd> - <dt>{{domxref("ChildNode.replaceWith()")}} {{experimental_inline}}</dt> - <dd>부모의 자식 목록에 있는 <code>ChildNode</code>를 {{domxref("Node")}} 또는 {{domxref("DOMString")}} 객체의 집합으로 대체합니다.{{domxref("DOMString")}} 객체는 {{domxref("Text")}} 노드와 동일하게 삽입됩니다.</dd> -</dl> - -<h2 id="명세">명세</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">명세</th> - <th scope="col">상태</th> - <th scope="col">코멘트</th> - </tr> - <tr> - <td>{{SpecName('DOM WHATWG', '#interface-childnode', 'ChildNode')}}</td> - <td>{{Spec2('DOM WHATWG')}}</td> - <td><code>ElementTraversal</code> 인터페이스를 {{domxref("ParentNode")}}와 <code>ChildNode</code>로 분리합니다. <code>previousElementSibling</code>과 <code>nextElementSibling</code>은 이제 마지막에 정의됩니다. {{domxref("CharacterData")}}와 {{domxref("DocumentType")}}은 새 인터페이스를 구현했습니다. <code>remove()</code>, <code>before()</code>, <code>after()</code> 및 <code>replaceWith()</code> 메소드가 추가되었습니다.</td> - </tr> - <tr> - <td>{{SpecName('Element Traversal', '#interface-elementTraversal', 'ElementTraversal')}}</td> - <td>{{Spec2('Element Traversal')}}</td> - <td>프로퍼티의 초기 정의가 <code>ElementTraversal</code> 순수 인터페이스에 추가되었고 {{domxref("Element")}}에서 사용합니다.</td> - </tr> - </tbody> -</table> - -<h2 id="폴리필">폴리필</h2> - -<p>github의 외부 코드: <a href="https://github.com/seznam/JAK/blob/master/lib/polyfills/childNode.js">childNode.js</a></p> - -<h2 id="브라우저_호환성">브라우저 호환성</h2> - - - -<p>{{Compat("api.ChildNode")}}</p> - -<h2 id="참고">참고</h2> - -<ul> - <li>{{domxref("ParentNode")}} 순수 인터페이스.</li> - <li> - <div class="syntaxbox">순수 인터페이스를 구현한 객체 타입: {{domxref("CharacterData")}}, {{domxref("Element")}} 및 {{domxref("DocumentType")}}.</div> - </li> -</ul> |