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/document/copy_event/index.html | 76 +++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 files/ja/web/api/document/copy_event/index.html (limited to 'files/ja/web/api/document/copy_event/index.html') diff --git a/files/ja/web/api/document/copy_event/index.html b/files/ja/web/api/document/copy_event/index.html new file mode 100644 index 0000000000..d52780b33f --- /dev/null +++ b/files/ja/web/api/document/copy_event/index.html @@ -0,0 +1,76 @@ +--- +title: 'Document: copy イベント' +slug: Web/API/Document/copy_event +tags: + - API + - Clipboard API + - Document + - Event + - Reference + - Web + - copy +translation_of: Web/API/Document/copy_event +--- +
{{APIRef}}
+ +

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

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

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

+ +

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

仕様書

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

ブラウザーの互換性

+ + + +

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

+ +

関連情報

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