Re: [w3c/FileAPI] editorial: make Blob.slice a separate algorithm (PR #183)

@mkruisselbrink commented on this pull request.

Generally looks good, just two minor points. I agree that just moving stuff around like this is probably not substantive. I really need to get around to rewriting splice more formally at some point, but that is unrelated to this.

> +    be set to the empty string.
+
+    <li>Otherwise, let <var>relativeContentType</var> be set to <var>contentType</var> and run the
+    substeps below:
+      1. If <var>relativeContentType</var> contains any characters outside the range of U+0020 to
+        U+007E, then set <var>relativeContentType</var> to the empty string and return from these
+        substeps.
+      2. Convert every character in <var>relativeContentType</var> to [=ASCII lowercase=].
+  </ol>
+
+1. Let <var>span</var> be <code>max((<var>relativeEnd</var> - <var>relativeStart</var>), 0)</code>.
+
+1. Return a new {{Blob}} object <var>S</var> with the following characteristics:
+
+  <ol type="a">
+    <li><var>S</var> refers to <var>span</var> consecutive <a>byte</a>s from <var>blob</var>'s,

```suggestion
    <li><var>S</var> refers to <var>span</var> consecutive <a>byte</a>s from <var>blob</var>'s
```

> @@ -193,6 +193,75 @@ The term <dfn id="UnixEpoch">Unix Epoch</dfn> is used in this specification to r
 (or 1970-01-01T00:00:00Z ISO 8601);
 this is the same time that is conceptually "<code>0</code>" in ECMA-262 [[ECMA-262]].
 
+<div algorithm>
+The <dfn id="slice-blob">slice blob</dfn> algorithm given a {{Blob}} <var>blob</var>,

You probably want this to be exported so you can reference it from fetch? And this should probably be an abstract-op, and I don't think it needs an explicit ID.

```suggestion
The <dfn abstract-op export>slice blob</dfn> algorithm given a {{Blob}} <var>blob</var>,
```

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

Message ID: <w3c/FileAPI/pull/183/review/1176636568@github.com>

Received on Friday, 11 November 2022 00:00:18 UTC