diff options
author | MDN <actions@users.noreply.github.com> | 2021-05-22 00:42:07 +0000 |
---|---|---|
committer | MDN <actions@users.noreply.github.com> | 2021-05-22 00:42:07 +0000 |
commit | 156b518735b8da6cc954105b0a1250ca31449381 (patch) | |
tree | 6a0e35a9622dc00acfc816503410e9a4cd360bc4 /files/ko/web/api | |
parent | 73aff5bd1edf14df05228693ed569b652ce89eee (diff) | |
download | translated-content-156b518735b8da6cc954105b0a1250ca31449381.tar.gz translated-content-156b518735b8da6cc954105b0a1250ca31449381.tar.bz2 translated-content-156b518735b8da6cc954105b0a1250ca31449381.zip |
[CRON] sync translated content
Diffstat (limited to 'files/ko/web/api')
-rw-r--r-- | files/ko/web/api/childnode/remove/index.html | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/files/ko/web/api/childnode/remove/index.html b/files/ko/web/api/childnode/remove/index.html deleted file mode 100644 index 2c4992989f..0000000000 --- a/files/ko/web/api/childnode/remove/index.html +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: ChildNode.remove() -slug: Web/API/ChildNode/remove -tags: - - API - - ChildNode - - DOM - - 메소드 - - 실험중 -translation_of: Web/API/ChildNode/remove ---- -<div>{{APIRef("DOM")}}</div> - -<p><code><strong>ChildNode.remove()</strong></code> 메소드는 이를 포함하는 트리로부터 객체를 제거합니다.</p> - -<h2 id="문법">문법</h2> - -<pre class="syntaxbox"><em>node</em>.remove(); -</pre> - -<h2 id="예제">예제</h2> - -<h3 id="remove()_사용하기"><code>remove()</code> 사용하기</h3> - -<pre class="brush: html"><div id="div-01">div-01 입니다</div> -<div id="div-02">div-02 입니다</div> -<div id="div-03">div-03 입니다</div> -</pre> - -<pre class="brush: js">var el = document.getElementById('div-02'); -el.remove(); // id가 'div-02' 인 div를 제거합니다 -</pre> - -<h3 id="ChildNode.remove()_는_스코프_지정_불가"><code>ChildNode.remove()</code> 는 스코프 지정 불가</h3> - -<p><code>remove()</code> 메소드는 <code>with</code> 구문으로 스코프를 지정할 수 없습니다. 자세한 내용은 {{jsxref("Symbol.unscopables")}} 을 확인하세요.</p> - -<pre class="brush: js">with(node) { - remove(); -} -// ReferenceError: remove is not defined </pre> - -<h2 id="폴리필">폴리필</h2> - -<p>인터넷 익스플로러 9 이상에서는 다음 코드를 사용해 <code>remove() 메소드</code> 를 폴리필링할 수 있습니다.</p> - -<pre class="brush: js">// from: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]);</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-remove', 'ChildNode.remove')}}</td> - <td>{{Spec2('DOM WHATWG')}}</td> - <td>초기 정의.</td> - </tr> - </tbody> -</table> - -<h2 id="브라우저_호환성">브라우저 호환성</h2> - -<div> - - -<p>{{Compat("api.ChildNode.remove")}}</p> -</div> - -<h2 id="함께_보기">함께 보기</h2> - -<ul> - <li>{{domxref("ChildNode")}} 순수 인터페이스.</li> - <li> - <div class="syntaxbox">이 순수 인터페이스를 구현하는 객체 타입: {{domxref("CharacterData")}}, {{domxref("Element")}}, {{domxref("DocumentType")}}.</div> - </li> -</ul> |