From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/window/copy_event/index.html | 77 +++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 files/ja/web/api/window/copy_event/index.html (limited to 'files/ja/web/api/window/copy_event/index.html') diff --git a/files/ja/web/api/window/copy_event/index.html b/files/ja/web/api/window/copy_event/index.html new file mode 100644 index 0000000000..9c31741043 --- /dev/null +++ b/files/ja/web/api/window/copy_event/index.html @@ -0,0 +1,77 @@ +--- +title: 'Window: copy イベント' +slug: Web/API/Window/copy_event +tags: + - API + - Clippboard API + - Event + - Reference + - Web + - Window + - copy + - イベント +translation_of: Web/API/Window/copy_event +--- +
{{APIRef}}
+ +

copy イベントは、ユーザーがブラウザーのユーザーインターフェイスからコピー操作を実行したときに発生します。

+ + + + + + + + + + + + + + + + + + + + +
バブリングあり
キャンセル
インターフェイス{{domxref("ClipboardEvent")}}
イベントハンドラープロパティ{{domxref("HTMLElement/oncopy", "oncopy")}}
+ +

このイベントの本来の対象は、コピー操作の意図の対象である {{domxref("Element")}} です。このイベントを {{domxref("Window")}} インターフェイス上で待ち受けし、キャプチャやバブリングの局面で処理することができます。このイベントの局面について完全な詳細は、 Element: copy イベントを参照してください。

+ +

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

仕様書

+ + + + + + + + + + + + + + +
仕様書状態
{{SpecName('Clipboard API', '#clipboard-event-copy')}}{{Spec2('Clipboard API')}}
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.Window.copy_event")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf