GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — minor update · FinnXing/JavaScript-Tutorial@95f5bee

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • 4-binary/03-blob
    • article.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎4-binary/03-blob/article.md‎

Copy file name to clipboardExpand all lines: 4-binary/03-blob/article.md
+3-3Lines changed: 3 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
我们在 [File API](https://www.w3.org/TR/FileAPI/) 一节中描述过,在浏览器中,有其他高阶对象,特别是 `Blob`。
66

7-
`Blob` 由一个可选的字符串 `type` (通常是 MIME-类型) 和 `blobParts` 组成 -- 一串其他 `Blob` 对象,字符串和 `BufferSources`。
7+
`Blob` 由一个可选的字符串 `type` (通常是 MIME-类型) 和 `blobParts` 组成 -- 一串其他 `Blob` 对象、字符串和 `BufferSources`。
88

99
![](blob.svg)
1010

@@ -55,7 +55,7 @@ blob.slice([byteStart], [byteEnd], [contentType]);
5555

5656
## Blob 作为 URL
5757

58-
Blob 可以很容易当做 URL 用于 `<a>`,`<img>` 或其他标记(tags),来显示其内容。
58+
Blob 可以很容易当做 URL 用于 `<a>`、`<img>` 或其他标记(tags),来显示其内容。
5959

6060
有了 `type`,我们也可以下载/上传 blobs,很自然的便成了网络请求中的 `Content-Type`。
6161

@@ -116,7 +116,7 @@ blob:https://javascript.info/1e67e00e-860d-40a5-89ae-6ab0cbee6273
116116

117117
## Blob 转换为 base64
118118

119-
`URL.createObjectURL` 的一个替代方法是,将 blob 转换为 base64-编码 的字符串。
119+
`URL.createObjectURL` 的一个可替代方法是,将 blob 转换为 base64-编码 的字符串。
120120

121121
这种编码是将二进制数据表示为一个由非常安全“可读“的 0-64 个 ASCII 码字符组成的字符串。而且更重要的是 -- 我们可以在数据 url 中使用此编码。
122122

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.