Document: copy event

The copy event fires when the user initiates a copy action through the browser's user interface.

Bubbles Yes
Cancelable Yes
Interface ClipboardEvent
Event handler property oncopy

The original target for this event is the Element that was the intended target of the copy action. You can listen for this event on the Document interface to handle it in the capture or bubbling phases. For full details on this event please see the page on the Element: copy event.

Examples

document.addEventListener('copy', (event) => {
    console.log('copy action initiated')
});

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
copy_event
1
≤18
6
No
15
3
1
18
6
14
3
1.0

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Document/copy_event