blob: c71597b18e8ba77a34850b86f590db8bd22cd9d1 (
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
80
|
---
title: 'Document: pointerdown イベント'
slug: Web/API/Document/pointerdown_event
tags:
- API
- Document
- Event
- PointerEvent
- Reference
- onpointerdown
- pointerdown
- イベント
translation_of: Web/API/Document/pointerdown_event
---
<div>{{APIRef}}</div>
<p><code>pointerdown</code> イベントは、ポインターがアクティブになったときに発生します。マウスでは、端末がボタンが押されていない状態から一つ以上のボタンが押されている状態に遷移したときに発生します。タッチ操作では、デジタイザーに物理的な接触が行われたときに発生します。ペンでは、スタイラスがデジタイザーに物理的に接触したときに発生します。</p>
<table class="properties">
<tbody>
<tr>
<th scope="row">バブリング</th>
<td>あり</td>
</tr>
<tr>
<th scope="row">キャンセル可能</th>
<td>はい</td>
</tr>
<tr>
<th scope="row">インターフェイス</th>
<td>{{domxref("PointerEvent")}}</td>
</tr>
<tr>
<th scope="row">イベントハンドラープロパティ</th>
<td>{{domxref("GlobalEventHandlers/onpointerdown", "onpointerdown")}}</td>
</tr>
</tbody>
</table>
<h2 id="Examples" name="Examples">例</h2>
<p><code>addEventListener()</code> の使用例:</p>
<pre class="brush: js">document.addEventListener('pointerdown', (event) => {
console.log('Pointer down event');
});</pre>
<p><code>onpointerdown</code> イベントハンドラープロパティの使用例:</p>
<pre class="brush: js">document.onpointerdown = (event) => {
console.log('Pointer down event');
};</pre>
<h2 id="Specifications" name="Specifications">仕様書</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">仕様書</th>
<th scope="col">状態</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName('Pointer Events', '#the-pointerdown-event')}}</td>
<td>{{Spec2('Pointer Events')}}</td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの対応</h2>
<p>{{Compat("api.Document.pointerdown_event")}}</p>
<h2 id="See_also" name="See_also">関連情報</h2>
<ul>
<li>{{domxref("GlobalEventHandlers/onpointerdown", "onpointerdown")}} イベントハンドラープロパティ</li>
<li><code>HTMLElement</code> を対象としたこのイベント: {{domxref("HTMLElement/pointerdown_event", "pointerdown")}} イベント</li>
</ul>
|