Window: paste event
The paste
event is fired when the user has initiated a "paste" action through the browser's user interface.
Bubbles | Yes |
---|---|
Cancelable | Yes |
Interface | ClipboardEvent |
Event handler property | onpaste |
The original target for this event is the Element
that was the intended target of the paste action. You can listen for this event on the Window
interface to handle it in the capture or bubbling phases. For full details on this event please see the page on the Element: paste event.
Examples
window.addEventListener('paste', (event) => { console.log('paste action initiated') });
Specifications
Specification |
---|
Clipboard API and events # clipboard-event-paste |
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 | |
paste_event |
1 |
12 |
Yes |
11 |
15 |
3 |
1 |
18 |
Yes |
14 |
3 |
1.0 |
See also
- Related events:
cut
,copy
- This event on
Element
targets:paste
- This event on
Document
targets:paste
© 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/Window/paste_event