Window: paste イベント
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2017.
paste
イベントは、ユーザーがブラウザーのユーザーインターフェイスから「貼り付け」操作を実行したときに発生します。
バブリング | あり |
---|---|
キャンセル | 可 |
インターフェイス | ClipboardEvent |
イベントハンドラープロパティ | onpaste |
このイベントの本来の対象は、貼り付け操作を意図する対象である Element
です。このイベントを Window
インターフェイス上で待ち受けし、キャプチャやバブリングの局面で処理することができます。このイベントの局面について完全な詳細は、 Element: paste イベントを参照してください。
例
js
document.addEventListener("paste", (event) => {
console.log("paste action initiated");
});
仕様書
Specification |
---|
Clipboard API and events # clipboard-event-paste |
HTML # handler-onpaste |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
paste event |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.