Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demix pointer capture events from GlobalEventHandlers #18450

Merged
merged 5 commits into from Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 9 additions & 6 deletions files/en-us/_redirects.txt
Expand Up @@ -7821,6 +7821,7 @@
/en-US/docs/Web/API/Document/defaultView/storage_event /en-US/docs/Web/API/Window/storage_event
/en-US/docs/Web/API/Document/domConfig /en-US/docs/Web/API/Document
/en-US/docs/Web/API/Document/getBoxObjectFor /en-US/docs/Web/API/Element/getBoundingClientRect
/en-US/docs/Web/API/Document/gotpointercapture_event /en-US/docs/Web/API/Element/gotpointercapture_event
/en-US/docs/Web/API/Document/inputEncoding /en-US/docs/Web/API/document/characterSet
/en-US/docs/Web/API/Document/keydown_event /en-US/docs/Web/API/Element/keydown_event
/en-US/docs/Web/API/Document/keypress_event /en-US/docs/Web/API/Element/keypress_event
Expand Down Expand Up @@ -7943,15 +7944,13 @@
/en-US/docs/Web/API/Element/attachInternals /en-US/docs/Web/API/HTMLElement/attachInternals
/en-US/docs/Web/API/Element/cancel_event /en-US/docs/Web/API/HTMLDialogElement/cancel_event
/en-US/docs/Web/API/Element/fullscreenchange /en-US/docs/Web/API/Element/fullscreenchange_event
/en-US/docs/Web/API/Element/gotpointercapture_event /en-US/docs/Web/API/HTMLElement/gotpointercapture_event
/en-US/docs/Web/API/Element/lostpointercapture_event /en-US/docs/Web/API/HTMLElement/lostpointercapture_event
/en-US/docs/Web/API/Element/mozRequestFullScreen /en-US/docs/Web/API/Element/requestFullScreen
/en-US/docs/Web/API/Element/msMatchesSelector /en-US/docs/Web/API/Element/matches
/en-US/docs/Web/API/Element/name /en-US/docs/Web/API
/en-US/docs/Web/API/Element/onfullscreenchange /en-US/docs/Web/API/Element/fullscreenchange_event
/en-US/docs/Web/API/Element/onfullscreenerror /en-US/docs/Web/API/Element/fullscreenerror_event
/en-US/docs/Web/API/Element/ongotpointercapture /en-US/docs/Web/API/GlobalEventHandlers/ongotpointercapture
/en-US/docs/Web/API/Element/onlostpointercapture /en-US/docs/Web/API/GlobalEventHandlers/onlostpointercapture
/en-US/docs/Web/API/Element/ongotpointercapture /en-US/docs/Web/API/Element/gotpointercapture_event
/en-US/docs/Web/API/Element/onlostpointercapture /en-US/docs/Web/API/Element/lostpointercapture_event
/en-US/docs/Web/API/Element/onwheel /en-US/docs/Web/API/Element/wheel_event
/en-US/docs/Web/API/Element/pointerlockchange_event /en-US/docs/Web/API/Document/pointerlockchange_event
/en-US/docs/Web/API/Element/resourcetimingbufferfull_event /en-US/docs/Web/API/Performance/resourcetimingbufferfull_event
Expand Down Expand Up @@ -8163,10 +8162,12 @@
/en-US/docs/Web/API/GlobalEventHandlers/onended /en-US/docs/Web/API/HTMLMediaElement/ended_event
/en-US/docs/Web/API/GlobalEventHandlers/onfocus /en-US/docs/Web/API/Window/focus_event
/en-US/docs/Web/API/GlobalEventHandlers/onformdata /en-US/docs/Web/API/HTMLFormElement/formdata_event
/en-US/docs/Web/API/GlobalEventHandlers/ongotpointercapture /en-US/docs/Web/API/Element/gotpointercapture_event
/en-US/docs/Web/API/GlobalEventHandlers/oninput /en-US/docs/Web/API/HTMLElement/input_event
/en-US/docs/Web/API/GlobalEventHandlers/onkeydown /en-US/docs/Web/API/Element/keydown_event
/en-US/docs/Web/API/GlobalEventHandlers/onkeypress /en-US/docs/Web/API/Element/keypress_event
/en-US/docs/Web/API/GlobalEventHandlers/onkeyup /en-US/docs/Web/API/Element/keyup_event
/en-US/docs/Web/API/GlobalEventHandlers/onlostpointercapture /en-US/docs/Web/API/Element/lostpointercapture_event
/en-US/docs/Web/API/GlobalEventHandlers/onmousedown /en-US/docs/Web/API/Element/mousedown_event
/en-US/docs/Web/API/GlobalEventHandlers/onmouseenter /en-US/docs/Web/API/Element/mouseenter_event
/en-US/docs/Web/API/GlobalEventHandlers/onmouseleave /en-US/docs/Web/API/Element/mouseleave_event
Expand Down Expand Up @@ -8263,7 +8264,9 @@
/en-US/docs/Web/API/HTMLElement/animationiteration_event /en-US/docs/Web/API/Element/animationiteration_event
/en-US/docs/Web/API/HTMLElement/animationstart_event /en-US/docs/Web/API/Element/animationstart_event
/en-US/docs/Web/API/HTMLElement/forceSpellCheck /en-US/docs/Web/HTML/Global_attributes/spellcheck
/en-US/docs/Web/API/HTMLElement/gotpointercapture_event /en-US/docs/Web/API/Element/gotpointercapture_event
/en-US/docs/Web/API/HTMLElement/invalid_event /en-US/docs/Web/API/HTMLInputElement/invalid_event
/en-US/docs/Web/API/HTMLElement/lostpointercapture_event /en-US/docs/Web/API/Element/lostpointercapture_event
/en-US/docs/Web/API/HTMLElement/onabort /en-US/docs/Web/API/HTMLMediaElement/abort_event
/en-US/docs/Web/API/HTMLElement/onblur /en-US/docs/Web/API/Window/blur_event
/en-US/docs/Web/API/HTMLElement/onchange /en-US/docs/Web/API/HTMLElement/change_event
Expand Down Expand Up @@ -11410,7 +11413,7 @@
/en-US/docs/Web/Events/gesturechange /en-US/docs/Web/API/Element/gesturechange_event
/en-US/docs/Web/Events/gestureend /en-US/docs/Web/API/Element/gestureend_event
/en-US/docs/Web/Events/gesturestart /en-US/docs/Web/API/Element/gesturestart_event
/en-US/docs/Web/Events/gotpointercapture /en-US/docs/Web/API/HTMLElement/gotpointercapture_event
/en-US/docs/Web/Events/gotpointercapture /en-US/docs/Web/API/Element/gotpointercapture_event
/en-US/docs/Web/Events/hashchange /en-US/docs/Web/API/Window/hashchange_event
/en-US/docs/Web/Events/icecandidate /en-US/docs/Web/API/RTCPeerConnection/icecandidate_event
/en-US/docs/Web/Events/iceconnectionstatechange /en-US/docs/Web/API/RTCPeerConnection/iceconnectionstatechange_event
Expand All @@ -11429,7 +11432,7 @@
/en-US/docs/Web/Events/loadedmetadata /en-US/docs/Web/API/HTMLMediaElement/loadedmetadata_event
/en-US/docs/Web/Events/loadend /en-US/docs/Web/API/XMLHttpRequest/loadend_event
/en-US/docs/Web/Events/loadstart /en-US/docs/Web/API/XMLHttpRequest/loadstart_event
/en-US/docs/Web/Events/lostpointercapture /en-US/docs/Web/API/HTMLElement/lostpointercapture_event
/en-US/docs/Web/Events/lostpointercapture /en-US/docs/Web/API/Element/lostpointercapture_event
/en-US/docs/Web/Events/mark /en-US/docs/Web/API/SpeechSynthesisUtterance/mark_event
/en-US/docs/Web/Events/merchantvalidation /en-US/docs/Web/API/PaymentRequest/merchantvalidation_event
/en-US/docs/Web/Events/message /en-US/docs/Web/API/BroadcastChannel/message_event
Expand Down
98 changes: 32 additions & 66 deletions files/en-us/_wikihistory.json
Expand Up @@ -35222,15 +35222,6 @@
"david_ross"
]
},
"Web/API/Document/gotpointercapture_event": {
"modified": "2020-10-15T22:14:51.520Z",
"contributors": [
"Clarkkkk",
"Wind1808",
"mfuji09",
"wbamberg"
]
},
"Web/API/Document/hasFocus": {
"modified": "2020-10-15T21:04:29.544Z",
"contributors": [
Expand Down Expand Up @@ -38716,6 +38707,22 @@
"Andreas Wuest"
]
},
"Web/API/Element/gotpointercapture_event": {
"modified": "2020-10-15T21:39:52.295Z",
"contributors": [
"Clarkkkk",
"gaearon",
"mfuji09",
"Wind1808",
"wbamberg",
"mfluehr",
"chrisdavidmills",
"fscholz",
"erikadoyle",
"rolfedh",
"AFBarstow"
]
},
"Web/API/Element/hasAttribute": {
"modified": "2020-10-15T21:11:17.789Z",
"contributors": [
Expand Down Expand Up @@ -39018,6 +39025,22 @@
"Sebastianz"
]
},
"Web/API/Element/lostpointercapture_event": {
"modified": "2020-10-15T21:39:53.427Z",
"contributors": [
"Clarkkkk",
"gaearon",
"mfuji09",
"Wind1808",
"wbamberg",
"mfluehr",
"chrisdavidmills",
"fscholz",
"erikadoyle",
"rolfedh",
"AFBarstow"
]
},
"Web/API/Element/matches": {
"modified": "2020-10-15T21:06:50.561Z",
"contributors": [
Expand Down Expand Up @@ -44278,19 +44301,6 @@
"alecananian"
]
},
"Web/API/GlobalEventHandlers/ongotpointercapture": {
"modified": "2020-10-15T21:51:24.512Z",
"contributors": [
"mfuji09",
"Wind1808",
"wbamberg",
"mfluehr",
"chrisdavidmills",
"fscholz",
"david_ross",
"jpmedley"
]
},
"Web/API/GlobalEventHandlers/oninvalid": {
"modified": "2020-10-15T21:44:05.936Z",
"contributors": [
Expand Down Expand Up @@ -44381,18 +44391,6 @@
"Guillaume-Heras"
]
},
"Web/API/GlobalEventHandlers/onlostpointercapture": {
"modified": "2020-10-15T21:51:24.333Z",
"contributors": [
"Wind1808",
"wbamberg",
"mfluehr",
"chrisdavidmills",
"fscholz",
"david_ross",
"jpmedley"
]
},
"Web/API/GlobalEventHandlers/onpause": {
"modified": "2020-10-15T21:44:06.725Z",
"contributors": [
Expand Down Expand Up @@ -45770,22 +45768,6 @@
"JesseW"
]
},
"Web/API/HTMLElement/gotpointercapture_event": {
"modified": "2020-10-15T21:39:52.295Z",
"contributors": [
"Clarkkkk",
"gaearon",
"mfuji09",
"Wind1808",
"wbamberg",
"mfluehr",
"chrisdavidmills",
"fscholz",
"erikadoyle",
"rolfedh",
"AFBarstow"
]
},
"Web/API/HTMLElement/hidden": {
"modified": "2020-10-15T21:56:20.245Z",
"contributors": [
Expand Down Expand Up @@ -45903,22 +45885,6 @@
"JesseW"
]
},
"Web/API/HTMLElement/lostpointercapture_event": {
"modified": "2020-10-15T21:39:53.427Z",
"contributors": [
"Clarkkkk",
"gaearon",
"mfuji09",
"Wind1808",
"wbamberg",
"mfluehr",
"chrisdavidmills",
"fscholz",
"erikadoyle",
"rolfedh",
"AFBarstow"
]
},
"Web/API/HTMLElement/mscandidatewindowhide_event": {
"modified": "2019-03-18T21:30:58.857Z",
"contributors": [
Expand Down
94 changes: 0 additions & 94 deletions files/en-us/web/api/document/gotpointercapture_event/index.md

This file was deleted.

41 changes: 16 additions & 25 deletions files/en-us/web/api/document/lostpointercapture_event/index.md
Expand Up @@ -15,28 +15,21 @@ browser-compat: api.Document.lostpointercapture_event

The **`lostpointercapture`** event is fired when a [captured pointer](/en-US/docs/Web/API/Pointer_events#pointer_capture) is released.

<table class="properties">
<tbody>
<tr>
<th scope="row">Bubbles</th>
<td>No</td>
</tr>
<tr>
<th scope="row">Cancelable</th>
<td>No</td>
</tr>
<tr>
<th scope="row">Interface</th>
<td>{{domxref("PointerEvent")}}</td>
</tr>
<tr>
<th scope="row">Event handler property</th>
<td>
{{domxref("GlobalEventHandlers/onlostpointercapture", "onlostpointercapture")}}
</td>
</tr>
</tbody>
</table>
## Syntax

Use the event name in methods like {{domxref("EventTarget.addEventListener", "addEventListener()")}}, or set an event handler property.

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

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

## Event type

An {{domxref("PointerEvent")}}. Inherits from {{domxref("Event")}}.

{{InheritanceDiagram("PointerEvent")}}

queengooborg marked this conversation as resolved.
Show resolved Hide resolved
## Examples

Expand Down Expand Up @@ -80,7 +73,6 @@ para.addEventListener('pointerdown', (event) => {

- Related events

- {{domxref("Document/lostpointercapture_event", "lostpointercapture")}}
- {{domxref("Document/pointerover_event", "pointerover")}}
- {{domxref("Document/pointerenter_event", "pointerenter")}}
- {{domxref("Document/pointerdown_event", "pointerdown")}}
Expand All @@ -90,5 +82,4 @@ para.addEventListener('pointerdown', (event) => {
- {{domxref("Document/pointerout_event", "pointerout")}}
- {{domxref("Document/pointerleave_event", "pointerleave")}}

- {{domxref("GlobalEventHandlers.onlostpointercapture")}} event handler property
- This event on `HTMLElement` targets: {{domxref("HTMLElement/lostpointercapture_event", "lostpointercapture")}} event
- This event on `Element` targets: {{domxref("Element/lostpointercapture_event", "lostpointercapture")}} event