script: implement ClipboardItem getType and supports (#39296)

Implement ClipboardItem's getType and supports

Testing: covered by existing tests

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
Gae24 2025-09-25 10:05:01 +02:00 committed by GitHub
parent 454d6052b4
commit 75e32ba5a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 141 additions and 43 deletions

View file

@ -97,7 +97,7 @@ DOMInterfaces = {
},
'ClipboardItem': {
'canGc': ['Types']
'canGc': ['GetType', 'Types']
},
'CookieStore': {

View file

@ -24,9 +24,9 @@ interface ClipboardItem {
readonly attribute PresentationStyle presentationStyle;
readonly attribute /* FrozenArray<DOMString> */ any types;
// Promise<Blob> getType(DOMString type);
[Throws] Promise<Blob> getType(DOMString type);
// static boolean supports(DOMString type);
static boolean supports(DOMString type);
};
enum PresentationStyle { "unspecified", "inline", "attachment" };