Skip to content

Commit

Permalink
2023/04/13 時点の英語版に同期
Browse files Browse the repository at this point in the history
  • Loading branch information
mfuji09 committed Jul 27, 2023
1 parent 4ea707d commit fcb2913
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 28 deletions.
27 changes: 14 additions & 13 deletions files/ja/web/api/element/gotpointercapture_event/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
title: 'Element: gotpointercapture イベント'
title: "Element: gotpointercapture イベント"
short-title: gotpointercapture
slug: Web/API/Element/gotpointercapture_event
original_slug: Web/API/Document/gotpointercapture_event
l10n:
sourceCommit: 1d055933f471b0a8a7a48a8408c1fa4a5e2c1adf
sourceCommit: 7b3ccaec4a93584da12939587ea746acaabe30bc
---

{{APIRef}}
Expand All @@ -15,14 +16,14 @@ l10n:
このイベント名を {{domxref("EventTarget.addEventListener", "addEventListener()")}} などのメソッドで使用するか、イベントハンドラープロパティを設定するかしてください。

```js
addEventListener('gotpointercapture', (event) => {});
addEventListener("gotpointercapture", (event) => {});

ongotpointercapture = (event) => { };
ongotpointercapture = (event) => {};
```

## イベント型

{{domxref("PointerEvent")}} です。 {{domxref("Event")}} を継承しています。
{{domxref("PointerEvent")}} です。{{domxref("Event")}} を継承しています。

{{InheritanceDiagram("PointerEvent")}}

Expand Down Expand Up @@ -56,27 +57,27 @@ _このインターフェイスは {{domxref("MouseEvent")}} および {{domxref
この例は `<p>` 要素を取得し、 `gotpointercapture` イベントを待ち受けします。 `setPointerCapture()``pointerdown` イベントの要素上で呼び出し、 `gotpointercapture` を発生させます。

```js
const para = document.querySelector('p');
const para = document.querySelector("p");

para.addEventListener('gotpointercapture', () => {
console.log('I\'ve been captured!')
para.addEventListener("gotpointercapture", () => {
console.log("I've been captured!");
});

para.addEventListener('pointerdown', (event) => {
para.addEventListener("pointerdown", (event) => {
para.setPointerCapture(event.pointerId);
});
```

同じ例ですが、 `ongotpointercapture` イベントハンドラーを使用して行います。
同じ例ですが、`ongotpointercapture` イベントハンドラーを使用して行います。

```js
const para = document.querySelector('p');
const para = document.querySelector("p");

para.ongotpointercapture = () => {
console.log('I\'ve been captured!')
console.log("I've been captured!");
};

para.addEventListener('pointerdown', (event) => {
para.addEventListener("pointerdown", (event) => {
para.setPointerCapture(event.pointerId);
});
```
Expand Down
3 changes: 2 additions & 1 deletion files/ja/web/api/element/lostpointercapture_event/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
title: "Element: lostpointercapture イベント"
short-title: lostpointercapture
slug: Web/API/Element/lostpointercapture_event
original_slug: Web/API/GlobalEventHandlers/onlostpointercapture
l10n:
sourceCommit: 9fb6c9e56c6db295967384730feeb941509ac743
sourceCommit: 7b3ccaec4a93584da12939587ea746acaabe30bc
---

{{APIRef}}
Expand Down
1 change: 1 addition & 0 deletions files/ja/web/api/element/pointercancel_event/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "Element: pointercancel イベント"
short-title: pointercancel
slug: Web/API/Element/pointercancel_event
original_slug: Web/API/Document/pointercancel_event
l10n:
Expand Down
19 changes: 10 additions & 9 deletions files/ja/web/api/element/pointerdown_event/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
title: 'Element: pointerdown イベント'
title: "Element: pointerdown イベント"
short-title: pointerdown
slug: Web/API/Element/pointerdown_event
original_slug: Web/API/Document/pointerdown_event
l10n:
sourceCommit: 1732201134d732af9bfd49ee9e10f7e2086cc783
sourceCommit: 7b3ccaec4a93584da12939587ea746acaabe30bc
---

{{APIRef}}
Expand All @@ -17,9 +18,9 @@ l10n:
このイベント名を {{domxref("EventTarget.addEventListener", "addEventListener()")}} などのメソッドで使用するか、イベントハンドラープロパティを設定するかしてください。

```js
addEventListener('pointerdown', (event) => {});
addEventListener("pointerdown", (event) => {});

onpointerdown = (event) => { };
onpointerdown = (event) => {};
```

## イベント型
Expand Down Expand Up @@ -58,20 +59,20 @@ _このインターフェイスは {{domxref("MouseEvent")}} および {{domxref
`addEventListener()` を使用した例です。

```js
const para = document.querySelector('p');
const para = document.querySelector("p");

para.addEventListener('pointerdown', (event) => {
console.log('Pointer down event');
para.addEventListener("pointerdown", (event) => {
console.log("Pointer down event");
});
```

`onpointerdown` イベントハンドラープロパティを使用した例です。

```js
const para = document.querySelector('p');
const para = document.querySelector("p");

para.onpointerdown = (event) => {
console.log('Pointer down event');
console.log("Pointer down event");
};
```

Expand Down
3 changes: 2 additions & 1 deletion files/ja/web/api/element/pointerenter_event/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
title: "Element: pointerenter イベント"
short-title: pointerenter
slug: Web/API/Element/pointerenter_event
original_slug: Web/API/Document/pointerenter_event
l10n:
sourceCommit: 9fb6c9e56c6db295967384730feeb941509ac743
sourceCommit: 7b3ccaec4a93584da12939587ea746acaabe30bc
---

{{APIRef}}
Expand Down
3 changes: 2 additions & 1 deletion files/ja/web/api/element/pointerleave_event/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
title: "Element: pointerleave イベント"
short-title: pointerleave
slug: Web/API/Element/pointerleave_event
original_slug: Web/API/Document/pointerleave_event
l10n:
sourceCommit: 9fb6c9e56c6db295967384730feeb941509ac743
sourceCommit: 7b3ccaec4a93584da12939587ea746acaabe30bc
---

{{APIRef}}
Expand Down
3 changes: 2 additions & 1 deletion files/ja/web/api/element/pointermove_event/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
title: "Element: pointermove イベント"
short-title: pointermove
slug: Web/API/Element/pointermove_event
original_slug: Web/API/Document/pointermove_event
l10n:
sourceCommit: abf155210d826c2584d23433eb2eac45a6669d23
sourceCommit: 7b3ccaec4a93584da12939587ea746acaabe30bc
---

{{APIRef}}
Expand Down
2 changes: 1 addition & 1 deletion files/ja/web/api/element/pointerout_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Element: pointerout イベント"
slug: Web/API/Element/pointerout_event
original_slug: Web/API/Document/pointerout_event
l10n:
sourceCommit: 9fb6c9e56c6db295967384730feeb941509ac743
sourceCommit: 7b3ccaec4a93584da12939587ea746acaabe30bc
---

{{APIRef}}
Expand Down
3 changes: 2 additions & 1 deletion files/ja/web/api/element/pointerover_event/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
title: "Element: pointerover イベント"
short-title: pointerover
slug: Web/API/Element/pointerover_event
original_slug: Web/API/Document/pointerover_event
l10n:
sourceCommit: 9fb6c9e56c6db295967384730feeb941509ac743
sourceCommit: 7b3ccaec4a93584da12939587ea746acaabe30bc
---

{{APIRef}}
Expand Down

0 comments on commit fcb2913

Please sign in to comment.