Skip to content

Commit b151465

Browse files
committed
fixes #2303
1 parent fa4665b commit b151465

File tree

1 file changed

+4
-2
lines changed
  • 2-ui/4-forms-controls/3-events-change-input

1 file changed

+4
-2
lines changed

2-ui/4-forms-controls/3-events-change-input/article.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,13 @@ For instance, the code below prevents all such events and shows what we are tryi
7676

7777
Please note, that it's possible to copy/paste not just text, but everything. For instance, we can copy a file in the OS file manager, and paste it.
7878

79-
There's a list of methods [in the specification](https://www.w3.org/TR/clipboard-apis/#dfn-datatransfer) that can work with different data types including files, read/write to the clipboard.
79+
That's because `clipboardData` implements `DataTransfer` interface, commonly used for drag'n'drop and copy/pasting. It's bit beyound our scope now, but you can find its methods [in the specification](https://html.spec.whatwg.org/multipage/dnd.html#the-datatransfer-interface).
8080

81-
But please note that clipboard is a "global" OS-level thing. Most browsers allow read/write access to the clipboard only in the scope of certain user actions for the safety, e.g. in `onclick` event handlers.
81+
```warn header="ClipboardAPI: user safety restrictions"
82+
The clipboard is a "global" OS-level thing. So most browsers allow read/write access to the clipboard only in the scope of certain user actions for the safety, e.g. in `onclick` event handlers.
8283
8384
Also it's forbidden to generate "custom" clipboard events with `dispatchEvent` in all browsers except Firefox.
85+
```
8486

8587
## Summary
8688

0 commit comments

Comments
 (0)