LibWeb: Implement navigator.clipboard.read

This commit is contained in:
Timothy Flynn 2025-05-01 18:00:42 -04:00 committed by Tim Flynn
commit 912009f6b3
Notes: github-actions[bot] 2025-05-02 21:47:14 +00:00
5 changed files with 163 additions and 1 deletions

View file

@ -89,6 +89,12 @@ WebIDL::ExceptionOr<GC::Ref<ClipboardItem>> ClipboardItem::construct_impl(JS::Re
return clipboard_item;
}
void ClipboardItem::append_representation(Representation representation)
{
m_types.append(representation.mime_type);
m_representations.append(move(representation));
}
// https://w3c.github.io/clipboard-apis/#dom-clipboarditem-gettype
WebIDL::ExceptionOr<GC::Ref<WebIDL::Promise>> ClipboardItem::get_type(String const& type)
{