diff --git a/testing/web-platform/tests/interfaces/clipboard-apis.idl b/testing/web-platform/tests/interfaces/clipboard-apis.idl index e48ca6a5e463..99d1155a3e36 100644 --- a/testing/web-platform/tests/interfaces/clipboard-apis.idl +++ b/testing/web-platform/tests/interfaces/clipboard-apis.idl @@ -16,13 +16,42 @@ partial interface Navigator { [SecureContext, SameObject] readonly attribute Clipboard clipboard; }; +typedef sequence ClipboardItems; + [SecureContext, Exposed=Window] interface Clipboard : EventTarget { - Promise read(); + Promise read(); Promise readText(); - Promise write(DataTransfer data); + Promise write(ClipboardItems data); Promise writeText(DOMString data); }; +typedef (DOMString or Blob) ClipboardItemDataType; +typedef Promise ClipboardItemData; + +callback ClipboardItemDelayedCallback = ClipboardItemData (); + +[Constructor(record items, + optional ClipboardItemOptions options), + Exposed=Window] interface ClipboardItem { + static ClipboardItem createDelayed( + record items, + optional ClipboardItemOptions options); + + readonly attribute PresentationStyle presentationStyle; + readonly attribute long long lastModified; + readonly attribute boolean delayed; + + readonly attribute FrozenArray types; + + Promise getType(DOMString type); +}; + +enum PresentationStyle { "unspecified", "inline", "attachment" }; + +dictionary ClipboardItemOptions { + PresentationStyle presentationStyle = "unspecified"; +}; + dictionary ClipboardPermissionDescriptor : PermissionDescriptor { boolean allowWithoutGesture = false; };