Re: [w3c/clipboard-apis] Add clipboard IDL description. (#158)

@mbrodesser commented on this pull request.



> +   1. If |formatString| is empty then abort these steps.
+
+   1. Let |payload| be the result of [=UTF-8 decoding=] |item|'s underlying byte sequence.
+
+   1. Insert |payload| and |presentationStyle| into the [=system clipboard=] using |formatString| as the native clipboard format.
+
+ </div><!-- algorithm -->
+
+ <div class="algorithm" data-algorithm="os-specific-well-known-format">
+ <h3 id="to-os-specific-well-known-format"><dfn>os specific well-known format</dfn></h3>
+
+  : Input
+  :: |mimeType|, a {{Blob/type}}
+
+  : Output
+  :: |wellKnownFormat|, a platform specific string type. On Mac it's NSString, on Windows and Linux it is fetched from the atom table.

Thanks for the link.

The text needs some clarification:
```
On Mac it's NSString
```
should be changed to
```
On Mac it's NSPasteboardType
```
`NSPasteboardType` is a typedef for `NSString`.

The text for Windows should include the type too; presumably that's an LPCSTR (https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-globalfindatoma)?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/clipboard-apis/pull/158#discussion_r792560677
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/clipboard-apis/pull/158/review/863437657@github.com>

Received on Wednesday, 26 January 2022 11:52:42 UTC