diff options
Diffstat (limited to 'files/ko/web/api/window')
-rw-r--r-- | files/ko/web/api/window/domcontentloaded_event/index.html | 78 | ||||
-rw-r--r-- | files/ko/web/api/window/load_event/index.html | 129 |
2 files changed, 207 insertions, 0 deletions
diff --git a/files/ko/web/api/window/domcontentloaded_event/index.html b/files/ko/web/api/window/domcontentloaded_event/index.html new file mode 100644 index 0000000000..212d755171 --- /dev/null +++ b/files/ko/web/api/window/domcontentloaded_event/index.html @@ -0,0 +1,78 @@ +--- +title: DOMContentLoaded +slug: Web/API/Window/DOMContentLoaded_event +tags: + - Event + - Reference + - Web + - Window +translation_of: Web/API/Window/DOMContentLoaded_event +original_slug: Web/Events/DOMContentLoaded +--- +<div>{{APIRef}}</div> + +<p><strong><code>DOMContentLoaded</code></strong> 이벤트는 초기 HTML 문서를 완전히 불러오고 분석했을 때 발생합니다. 스타일 시트, 이미지, 하위 프레임의 로딩은 기다리지 않습니다.</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row">확산</th> + <td>예</td> + </tr> + <tr> + <th scope="row">취소 가능</th> + <td>예 (although specified as a simple event that isn't cancelable)</td> + </tr> + <tr> + <th scope="row">인터페이스</th> + <td>{{domxref("Event")}}</td> + </tr> + <tr> + <th scope="row">이벤트 처리기 속성</th> + <td>아니오</td> + </tr> + </tbody> +</table> + +<p><code>DOMContentLoaded</code>의 원본 대상은 다 불러온 {{domxref("Document")}}입니다. You can listen for this event on the <code>Window</code> interface to handle it in the capture or bubbling phases. For full details on this event please see the page on the Document: {{domxref("Document/DOMContentLoaded_event", "DOMContentLoaded")}} event.</p> + +<p>A different event, {{domxref("Window/load_event", "load")}}, should be used only to detect a fully-loaded page. It is a common mistake to use <code>load</code> where <code>DOMContentLoaded</code> would be more appropriate.</p> + +<h2 id="예제">예제</h2> + +<h3 id="기본_용도">기본 용도</h3> + +<pre class="brush: js notranslate">window.addEventListener('DOMContentLoaded', (event) => { + console.log('DOM fully loaded and parsed'); +}); +</pre> + +<h2 id="사양">사양</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">사양</th> + <th scope="col">상태</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('HTML WHATWG', 'indices.html#event-domcontentloaded')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + </tr> + </tbody> +</table> + +<h2 id="브라우저_호환성">브라우저 호환성</h2> + + + +<p>{{Compat("api.Window.DOMContentLoaded_event")}}</p> + +<h2 id="같이_보기">같이 보기</h2> + +<ul> + <li>Related events: {{domxref("Window/load_event", "load")}}, {{domxref("Document/readystatechange_event", "readystatechange")}}, {{domxref("Window/beforeunload_event", "beforeunload")}}, {{domxref("Window/unload_event", "unload")}}</li> + <li>This event on {{domxref("Document")}} targets: {{domxref("Document/DOMContentLoaded_event", "DOMContentLoaded")}}</li> +</ul> diff --git a/files/ko/web/api/window/load_event/index.html b/files/ko/web/api/window/load_event/index.html new file mode 100644 index 0000000000..8bfa5a0dcd --- /dev/null +++ b/files/ko/web/api/window/load_event/index.html @@ -0,0 +1,129 @@ +--- +title: load +slug: Web/API/Window/load_event +tags: + - Event + - 이벤트 +translation_of: Web/API/Window/load_event +original_slug: Web/Events/load +--- +<p><code>load</code> 이벤트는 리소스와 그것에 의존하는 리소스들의 로딩이 완료되면 실행됩니다.</p> + +<p> </p> + +<h2 id="예제">예제</h2> + +<h3 class="brush: html" id="Window">Window</h3> + +<pre class="brush: html"><script> + window.addEventListener("load", function(event) { + console.log("All resources finished loading!"); + }); +</script></pre> + +<h3 class="brush: html" id="script_엘리먼트"><code>script</code> 엘리먼트</h3> + +<pre class="brush: html"><script> + var script = document.createElement("script"); + script.addEventListener("load", function(event) { + console.log("Script finished loading and executing"); + }); + script.src = "http://example.com/example.js"; + script.async = true; + document.getElementsByTagName("script")[0].parentNode.appendChild(script); +</script></pre> + +<h2 id="일반_정보">일반 정보</h2> + +<dl> + <dt style="float: left; text-align: right; width: 120px;">스펙</dt> + <dd style="margin: 0 0 0 120px;"><a class="external" href="http://www.w3.org/TR/DOM-Level-3-Events/#event-type-load">DOM L3</a></dd> + <dt style="float: left; text-align: right; width: 120px;">인터페이스</dt> + <dd style="margin: 0 0 0 120px;">UIEvent</dd> + <dt style="float: left; text-align: right; width: 120px;">Bubbles</dt> + <dd style="margin: 0 0 0 120px;">No</dd> + <dt style="float: left; text-align: right; width: 120px;">취소가능 여부</dt> + <dd style="margin: 0 0 0 120px;">No</dd> + <dt style="float: left; text-align: right; width: 120px;">타겟</dt> + <dd style="margin: 0 0 0 120px;">Window,Document,Element</dd> + <dt style="float: left; text-align: right; width: 120px;">기본 동작</dt> + <dd style="margin: 0 0 0 120px;">None.</dd> +</dl> + +<h2 id="속성">속성</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">속성</th> + <th scope="col">타입</th> + <th scope="col">설명</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>target</code> {{readonlyInline}}</td> + <td><code>{{domxref("EventTarget")}}</code></td> + <td>The event target (the topmost target in the DOM tree).</td> + </tr> + <tr> + <td><code>type</code> {{readonlyInline}}</td> + <td><code>{{domxref("DOMString")}}</code></td> + <td>The type of event.</td> + </tr> + <tr> + <td><code>bubbles</code> {{readonlyInline}}</td> + <td><code>{{domxref("Boolean")}}</code></td> + <td>Whether the event normally bubbles or not.</td> + </tr> + <tr> + <td><code>cancelable</code> {{readonlyInline}}</td> + <td><code>{{domxref("Boolean")}}</code></td> + <td>Whether the event is cancellable or not.</td> + </tr> + <tr> + <td><code>view</code> {{readonlyInline}}</td> + <td><code>{{domxref("WindowProxy")}}</code></td> + <td><code>{{domxref("Document.defaultView", "document.defaultView")}}</code> (<code>window</code> of the document)</td> + </tr> + <tr> + <td><code>detail</code> {{readonlyInline}}</td> + <td><code>long</code> (<code>float</code>)</td> + <td>0.</td> + </tr> + </tbody> +</table> + +<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('UI Events', '#event-type-load', 'load')}}</td> + <td>{{Spec2('UI Events')}}</td> + <td> </td> + </tr> + <tr> + <td>{{SpecName('HTML WHATWG', 'parsing.html#the-end:event-load', 'Load event')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td> + <p>이것은 문서 로딩이 끝날때 수행되는 단계와 연결되는 섹션과 연결됩니다. 'load' 이벤트는 많은 엘리먼트들에서도 발생합니다. 그리고 스펙 문서에서는 많은 곳에서 "<a href="https://html.spec.whatwg.org/multipage/parsing.html#delay-the-load-event">load이벤트를 지연할 수 있는</a>" 것들을 언급한다는 것을 주의하십시오.</p> + </td> + </tr> + </tbody> +</table> + +<h2 id="관련_이벤트">관련 이벤트</h2> + +<ul> + <li>{{event("DOMContentLoaded")}}</li> + <li>{{event("readystatechange")}}</li> + <li>{{event("load")}}</li> + <li>{{event("beforeunload")}}</li> + <li>{{event("unload")}}</li> +</ul> |