ladybird/Libraries/LibWeb/Clipboard/ClipboardItem.idl

22 lines
715 B
Text

typedef Promise<(DOMString or Blob)> ClipboardItemData;
// https://w3c.github.io/clipboard-apis/#clipboard-item-interface
[SecureContext, Exposed=Window]
interface ClipboardItem {
constructor(record<DOMString, ClipboardItemData> items,
optional ClipboardItemOptions options = {});
readonly attribute PresentationStyle presentationStyle;
// FIXME: Should be a FrozenArray<DOMString>
readonly attribute sequence<DOMString> types;
Promise<Blob> getType(DOMString type);
static boolean supports(DOMString type);
};
enum PresentationStyle { "unspecified", "inline", "attachment" };
dictionary ClipboardItemOptions {
PresentationStyle presentationStyle = "unspecified";
};