diff options
Diffstat (limited to 'files/ko/web/api/event')
-rw-r--r-- | files/ko/web/api/event/target/index.html | 75 |
1 files changed, 40 insertions, 35 deletions
diff --git a/files/ko/web/api/event/target/index.html b/files/ko/web/api/event/target/index.html index 02fbdd8726..1fa5ad467e 100644 --- a/files/ko/web/api/event/target/index.html +++ b/files/ko/web/api/event/target/index.html @@ -11,17 +11,17 @@ translation_of: Web/API/Event/target --- <p>{{ApiRef("DOM")}}</p> -<p>{{domxref("Event")}} interface의 <code><strong>target</strong></code> 속성은 event가 전달한 객체에 대한 참조입니다. 이는 이벤트의 버블링 또는 캡처 단계에서 이벤트 핸들러를 호출하는 {{domxref("Event.currentTarget")}}와 다릅니다.</p> +<p>{{domxref("Event")}} interface의 <code><strong>target</strong></code> 속성은 event가 전달한 객체에 대한 참조입니다. 이는 이벤트의 버블링 또는 캡처 단계에서 이벤트 핸들러를 호출하는 {{domxref("Event.currentTarget")}}와 다릅니다.</p> -<h2 id="Syntax">Syntax</h2> +<h2 id="Syntax">구문</h2> -<pre class="syntaxbox notranslate">theTarget = event.target</pre> +<pre class="brush: js">const theTarget = someEvent.target</pre> <h3 id="Value">Value</h3> <p>{{domxref("EventTarget")}}</p> -<h2 id="Example">Example</h2> +<h2 id="Example">예제</h2> <p><code>event.target</code> 속성을 사용하여 <strong>event delegation</strong>을 구현할 수 있습니다.</p> @@ -45,51 +45,56 @@ function hide(e){ ul.addEventListener('click', hide, false); </pre> -<h2 id="Specifications">Specifications</h2> +<h2 id="Specifications">명세</h2> <table class="standard-table"> - <tbody> - <tr> - <th>Specification</th> - <th>Status</th> - <th>Comment</th> - </tr> - <tr> - <td>{{SpecName("DOM WHATWG", "#dom-event-target", "Event.target")}}</td> - <td>{{Spec2("DOM WHATWG")}}</td> - <td></td> - </tr> - <tr> - <td>{{SpecName("DOM4", "#dom-event-target", "Event.target")}}</td> - <td>{{Spec2("DOM4")}}</td> - <td></td> - </tr> - <tr> - <td>{{SpecName("DOM2 Events", "#Events-Event-target", "Event.target")}}</td> - <td>{{Spec2("DOM2 Events")}}</td> - <td>Initial definition</td> - </tr> - </tbody> + <thead> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName("DOM WHATWG", "#dom-event-target", "Event.target")}}</td> + <td>{{Spec2("DOM WHATWG")}}</td> + <td></td> + </tr> + <tr> + <td>{{SpecName("DOM4", "#dom-event-target", "Event.target")}}</td> + <td>{{Spec2("DOM4")}}</td> + <td></td> + </tr> + <tr> + <td>{{SpecName("DOM2 Events", "#Events-Event-target", "Event.target")}}</td> + <td>{{Spec2("DOM2 Events")}}</td> + <td>Initial definition</td> + </tr> + </tbody> </table> -<h2 id="Browser_compatibility">Browser compatibility</h2> - - +<h2 id="Browser_compatibility">브라우저 호환성</h2> <p>{{Compat("api.Event.target")}}</p> -<h2 id="Compatibility_notes">Compatibility notes</h2> +<h3 id="Compatibility_notes">호환성 참고</h3> + +<p>IE 6–8에서는 이벤트 모델이 다릅니다. 이벤트 리스너는 비표준 + {{domxref('EventTarget.attachEvent()')}} 메서드로 연결됩니다.</p> -<p>On IE 6-8 the event model is different. Event listeners are attached with the non-standard {{domxref('EventTarget.attachEvent')}} method. In this model, the event object has a {{domxref('Event.srcElement')}} property, instead of the <code>target</code> property, and it has the same semantics as <code>event.target</code>.</p> +<p>이 모델에서 이벤트 객체는 {{domxref('Event.srcElement')}} 속성 + (<code>target</code> 속성 대신)을 가지며 <code>Event.target</code>과 + 동일한 의미를 갖습니다.</p> -<pre class="brush: js notranslate">function hide(e) { +<pre class="brush: js">function hide(evt) { // Support IE6-8 - var target = e.target || e.srcElement; + var target = evt.target || evt.srcElement; target.style.visibility = 'hidden'; } </pre> -<h2 id="See_also">See also</h2> +<h2 id="See_also">같이 보기</h2> <ul> <li><a href="/en-US/docs/Web/API/Event/Comparison_of_Event_Targets">Comparison of Event Targets</a></li> |