Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'starts with' to web custom format prefix. #195

Merged
merged 6 commits into from
Oct 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -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=].
snianu marked this conversation as resolved.
Show resolved Hide resolved


<h2 id="async-clipboard-api">Asynchronous Clipboard API</h2>
Expand Down Expand Up @@ -671,9 +670,9 @@ url: https://w3c.github.io/permissions/#permissions-task-source; type: dfn;

1. Let |isCustom| be |false|.

1. If |key| [=string/starts with=] "web " ("web" followed by U+0020 SPACE) prefix, then
1. If |key| [=string/starts with=] `"web "` prefix, then

1. Remove "web " prefix and set the remaining string to |key|.
1. Remove `"web "` prefix and set the remaining string to |key|.
snianu marked this conversation as resolved.
Show resolved Hide resolved

1. Set |isCustom| |true|

Expand All @@ -695,7 +694,7 @@ url: https://w3c.github.io/permissions/#permissions-task-source; type: dfn;

1. Let |mimeTypeString| be the result of [=serializing a MIME type=] with |mimeType|.

1. If |isCustom| is |true|, prefix |mimeTypeString| with "web " ("web" followed by U+0020 SPACE).
1. If |isCustom| is |true|, prefix |mimeTypeString| with `"web "`.

1. Add |mimeTypeString| to |types|.

Expand All @@ -719,9 +718,9 @@ url: https://w3c.github.io/permissions/#permissions-task-source; type: dfn;

1. Let |isCustom| be |false|.

1. If |type| [=string/starts with=] "web "("web" followed by U+0020 SPACE) prefix, then:
1. If |type| [=string/starts with=] `"web "` prefix, then:

1. Remove "web " prefix and set the remaining string to |type|.
1. Remove `"web "` prefix and set the remaining string to |type|.
snianu marked this conversation as resolved.
Show resolved Hide resolved

1. Set |isCustom| to |true|.

Expand Down Expand Up @@ -1697,7 +1696,13 @@ url: https://w3c.github.io/permissions/#permissions-task-source; type: dfn;

1. Let |webCustomFormat| be an empty {{Blob/type}}.

1. If |webCustomFormatString| [string/starts with=] "web "("web" followed by U+0020 SPACE) prefix, then remove the "web " prefix and store the remaining string in |webCustomFormat|'s {{Blob/type}}'s [=MIME type/essence=], else abort all steps.
1. If |webCustomFormatString| [=string/starts with=] `"web "` prefix, then remove the `"web "` prefix and store the remaining string in |webMimeTypeString|.

1. Let |webMimeType| be the result of [=parsing a MIME type=] given |webMimeTypeString|.

1. If |webMimeType| is failure, then abort all steps.

1. Let |webCustomFormat|'s {{Blob/type}}'s [=MIME type/essence=] equal to |webMimeType|.

1. Set |item|'s {{Blob/type}} to |webCustomFormat|.

Expand Down
Loading