Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: content/test/data/paste_listener.html

Issue 2146323002: Expose RTF content on the clipboard as strings to pages when pasting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use the IO thread on Windows. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <title>Waiting for paste</title>
2 <body>
3 <script>
4 document.body.contentEditable = true;
5 document.body.addEventListener('paste', (event) => {
dcheng 2016/07/20 07:02:17 Apparently I don't know JS^WES6.
6 Array.prototype.forEach.call(event.clipboardData.items, (item) => {
7 if (item.type != 'text/rtf') {
8 return;
9 }
10 item.getAsString((s) => {
11 document.title = s;
12 });
13 });
14 });
15 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698