Document: lostpointercapture event

이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 참여해서 번역을 마치도록 도와 주세요!
English (US)의 문서도 읽어보세요.

The lostpointercapture event is fired when a captured pointer is released.

Bubbles No
Cancelable No
Interface PointerEvent
Event handler property onlostpointercapture

Examples

This example listens for the lostpointercapture event, and captures the pointer for an element on pointerdown. When the user subsequently releases the pointer, the lostpointercapture event will be fired.

const para = document.querySelector('p');

document.addEventListener('lostpointercapture', () => {
  console.log('I\'ve been released!')
});

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

The same example, but using the onlostpointercapture event handler property:

const para = document.querySelector('p');

document.onlostpointercapture = () => {
  console.log('I\'ve been released!')
};

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

Specifications

Specification Status
Pointer Events Recommendation

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
lostpointercapture eventChrome Full support 57Edge ? Firefox Full support 59IE ? Opera Full support 44Safari ? WebView Android Full support 57Chrome Android Full support 57Edge Mobile ? Firefox Android No support NoOpera Android Full support 43Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

See also

문서 태그 및 공헌자

이 페이지의 공헌자: mfuji09, mdnwebdocs-bot, wbamberg
최종 변경자: mfuji09,