mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibWeb: Implement navigator.clipboard.write
This commit is contained in:
parent
a1985e57e7
commit
a4e9a27343
Notes:
github-actions[bot]
2025-05-02 21:47:22 +00:00
Author: https://github.com/trflynn89
Commit: a4e9a27343
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4548
Reviewed-by: https://github.com/shannonbooth
4 changed files with 150 additions and 3 deletions
|
@ -18,7 +18,8 @@ namespace Web::Clipboard {
|
|||
|
||||
constexpr auto WEB_CUSTOM_FORMAT_PREFIX = "web "sv;
|
||||
|
||||
inline constexpr Array MANDATORY_DATA_TYPES = {
|
||||
// https://w3c.github.io/clipboard-apis/#mandatory-data-types
|
||||
constexpr inline Array MANDATORY_DATA_TYPES = {
|
||||
"text/plain"sv, "text/html"sv, "image/png"sv
|
||||
};
|
||||
|
||||
|
@ -45,6 +46,7 @@ public:
|
|||
Bindings::PresentationStyle presentation_style() const { return m_presentation_style; }
|
||||
|
||||
Vector<String> const& types() const { return m_types; }
|
||||
Vector<Representation> const& representations() const { return m_representations; }
|
||||
|
||||
WebIDL::ExceptionOr<GC::Ref<WebIDL::Promise>> get_type(String const& type);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue