Skip to content

Commit 9f681a9

Browse files
authored
Merge pull request #314 from tindzk/clipboard
Clipboard events: Fix signatures and add comments
2 parents a5b9ae4 + 1d7d07f commit 9f681a9

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

src/main/scala/org/scalajs/dom/raw/lib.scala

+25-3
Original file line numberDiff line numberDiff line change
@@ -777,9 +777,31 @@ abstract class Element
777777

778778
var id: String = js.native
779779

780-
var oncut: js.Function1[DragEvent, _] = js.native
781-
var oncopy: js.Function1[DragEvent, _] = js.native
782-
var onpaste: js.Function1[DragEvent, _] = js.native
780+
/**
781+
* The copy event is fired when the user initiates a copy action through the
782+
* browser UI (for example, using the CTRL/Cmd+C keyboard shortcut or
783+
* selecting the "Copy" from the menu) and in response to an allowed
784+
* `document.execCommand("copy")` call.
785+
*
786+
* MDN
787+
*/
788+
var oncopy: js.Function1[ClipboardEvent, _] = js.native
789+
790+
/**
791+
* The cut event is fired when a selection has been removed from the document
792+
* and added to the clipboard.
793+
*
794+
* MDN
795+
*/
796+
var oncut: js.Function1[ClipboardEvent, _] = js.native
797+
798+
/**
799+
* The paste event is fired when a selection has been pasted from the
800+
* clipboard to the document.
801+
*
802+
* MDN
803+
*/
804+
var onpaste: js.Function1[ClipboardEvent, _] = js.native
783805

784806
var accessKey: String = js.native
785807

0 commit comments

Comments
 (0)