async clipboard: implement readText (#36689)

part of #36084
Testing: Only idl harness tests will pass for now

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
Gae24 2025-05-07 17:11:37 +02:00 committed by GitHub
parent 348eede37b
commit 5b913441d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 151 additions and 13 deletions

View file

@ -88,7 +88,7 @@ DOMInterfaces = {
},
'Clipboard': {
'canGc': ['WriteText']
'canGc': ['ReadText', 'WriteText']
},
'ClipboardItem': {

View file

@ -9,7 +9,7 @@ typedef sequence<ClipboardItem> ClipboardItems;
[SecureContext, Exposed=Window, Pref="dom_async_clipboard_enabled"]
interface Clipboard : EventTarget {
// Promise<ClipboardItems> read();
// Promise<DOMString> readText();
Promise<DOMString> readText();
// Promise<undefined> write(ClipboardItems data);
Promise<undefined> writeText(DOMString data);
};