Re: [w3c/clipboard-apis] Add 'starts with' to web custom format prefix. (PR #195)

@evanstade requested changes on this pull request.



> @@ -539,9 +539,8 @@ url: https://w3c.github.io/permissions/#permissions-task-source; type: dfn;
 
    * text/uri-list
    * image/svg+xml
-   * Custom format [=string/starts with=] "web "("web" followed by U+0020 SPACE) prefix
-    and suffix (after stripping out "web "("web" followed by U+0020 SPACE)) is a valid
-    [=/MIME type=].
+   * Custom format [=string/starts with=] `"web "`("web" followed by U+0020 SPACE) prefix
+    and suffix (after stripping out `"web "`) is a valid [=/MIME type=].

in the MIME sniffing standard I found:

> "text/html;" is not a [valid MIME type string](https://mimesniff.spec.whatwg.org/#valid-mime-type), though [parse a MIME type](https://mimesniff.spec.whatwg.org/#parse-a-mime-type) returns a [MIME type record](https://mimesniff.spec.whatwg.org/#mime-type) for it identical to if the input had been "text/html".

So do we really want to require this to be a valid mime type? The "new ClipboardItem" steps, as well as the algorithm that's touched below, we don't require validity, just that parsing succeeds.

>      
-     1. Remove "web " prefix and set the remaining string to |key|.
+     1. Remove `"web "` prefix and set the remaining string to |key|.

nit: `assign the remaining string to |key|` or `set |key| to the remaining string`

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

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

Received on Saturday, 21 October 2023 00:14:19 UTC