aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/globaleventhandlers/onpointerenter/index.html
blob: a9e0087ecc73baaa1b86898c31ac34d64e2dc465 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
title: GlobalEventHandlers.onpointerenter
slug: Web/API/GlobalEventHandlers/onpointerenter
translation_of: Web/API/GlobalEventHandlers/onpointerenter
---
<div>{{ApiRef("HTML DOM")}}</div>

<p>{{domxref("GlobalEventHandlers")}} mixin의 <strong><code>onpointerenter</code></strong><em> </em>property는 {{event("pointerenter")}} 이벤트를 처리하는 {{domxref("EventHandler")}} 이다.</p>

<h2 id="Syntax">Syntax</h2>

<pre class="syntaxbox notranslate"><var>targetElement</var>.onpointerenter = <var>enterHandler</var>;

var <var>enterHandler</var> = <var>targetElement</var>.onpointerenter;
</pre>

<h3 id="Value">Value</h3>

<dl>
 <dt><code>enterHandler</code></dt>
 <dd>The <code>pointerenter</code> event handler for element <code>targetElement</code>.</dd>
</dl>

<h2 id="Example">Example</h2>

<p>아래 예제는 element의 <code>pointerenter</code> 이벤트 핸들러를 설정하는 <code>onpointerenter</code> 의 2가지 사용법을 보여준다.</p>

<pre class="brush: html notranslate">&lt;html&gt;
&lt;script&gt;
function enterHandler(ev) {
  // pointerenter event처리
}
function init() {
  let el = document.getElementById('target1');
  el.onpointerenter = enterHandler;
}
&lt;/script&gt;

&lt;body onload="init();"&gt;
  &lt;div id="target1"&gt; Touch me ... &lt;/div&gt;
  &lt;div id="target2" onpointerenter="enterHandler(event)"&gt; Touch me ... &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('Pointer Events 2','#dom-globaleventhandlers-onpointerenter', 'onpointerenter')}}</td>
   <td>{{Spec2('Pointer Events 2')}}</td>
   <td>Non-stable version</td>
  </tr>
  <tr>
   <td>{{SpecName('Pointer Events', '#widl-GlobalEventHandlers-onpointerenter', 'onpointerenter')}}</td>
   <td>{{Spec2('Pointer Events')}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>



<p>{{Compat("api.GlobalEventHandlers.onpointerenter")}}</p>

<h2 id="See_also">See also</h2>

<ul>
 <li><code><a href="/en-US/docs/Web/API/Document/pointerenter_event">Document: pointerenter</a></code> event</li>
 <li><code><a href="/en-US/docs/Web/API/HTMLElement/pointerenter_event">HTMLElement: pointerenter</a></code> event</li>
</ul>