zh-cn: update web/api/indexeddb_api/using_indexeddb#35198
Open
PassionPenguin wants to merge 4 commits intomdn:mainfrom
Open
zh-cn: update web/api/indexeddb_api/using_indexeddb#35198PassionPenguin wants to merge 4 commits intomdn:mainfrom
web/api/indexeddb_api/using_indexeddb#35198PassionPenguin wants to merge 4 commits intomdn:mainfrom
Conversation
Contributor
|
Preview URLs (1 page) Flaws (2) Found an unexpected or unresolvable flaw? Please report it here. URL:
External URLs (18)URL:
(comment last updated: 2026-04-15 14:48:42) |
Comment on lines
+590
to
+592
| console.log( | ||
| "本页面的一个新版本已就绪,请刷新网页以加载!", | ||
| ); |
Contributor
There was a problem hiding this comment.
[mdn-linter] reported by reviewdog 🐶
Suggested change
| console.log( | |
| "本页面的一个新版本已就绪,请刷新网页以加载!", | |
| ); | |
| console.log("本页面的一个新版本已就绪,请刷新网页以加载!"); |
Totoro-jam
reviewed
Apr 15, 2026
| // 当所有数据都添加到数据库后执行某些操作。 | ||
| transaction.oncomplete = (event) => { | ||
| console.log("全部完成了!"); | ||
| console.log("All done!"); |
Contributor
There was a problem hiding this comment.
这里是不是要翻译,按照前面的revier 习惯?
Totoro-jam
reviewed
Apr 15, 2026
| ## 关于本文档 | ||
|
|
||
| 本篇教程将指导你如何使用 IndexedDB 的异步 API。如果你对 IndexedDB 还不熟悉,你应该首先阅读文章:[IndexedDB 的关键特性和基本术语](/zh-CN/docs/Web/API/IndexedDB_API/Basic_Terminology)。 | ||
| 本教程将带你了解如何使用 IndexedDB 的异步 API。如果你还不熟悉 IndexedDB,建议先阅读 [IndexedDB 的关键特性和基本术语](/zh-CN/docs/Web/API/IndexedDB_API/Basic_Terminology)一文。 |
Contributor
There was a problem hiding this comment.
这里中文对应的文档没有,是不是要改成这个: Basic_Terminology 中文页面不存在
。 特别是对应的片段这些都不能用
Contributor
Author
There was a problem hiding this comment.
rari会自动处理好不存在的页面的提示或直接重定向到en-US页面去的
Totoro-jam
reviewed
Apr 15, 2026
| 如果请求成功,会触发 {{domxref("IDBRequest.success_event", "success")}} 事件,并调用赋给 `onsuccess` 参数的函数。请求失败时,会触发 {{domxref("IDBRequest.error_event", "error")}} 事件,并调用赋给 `onerror` 参数的函数。 | ||
|
|
||
| IndexedDB API 以满足尽可能地减少对错误处理的需求而设计,所以你可能不会看到有很多的错误事件(至少,不会在你已经习惯了这些 API 之后!)。然而在打开数据库的情况下,还是有一些会产生错误事件的常见情况。最有可能出现的问题是用户决定不允许你的 web 应用创建数据库。IndexedDB 的主要设计目标之一就是允许大量数据可以被存储以供离线使用。(要了解关于针对每个浏览器你可以有多少存储空间的更多内容,请参见[浏览器存储限制和清理标准页面的数据存储限制](/zh-CN/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria#数据存储限制))。 | ||
| IndexedDB API 的设计目标之一是尽量减少你对错误处理的需求,因此你通常不会频繁遇到错误事件(至少在你熟悉 API 后是这样)。但在打开数据库时,确实有一些常见情况会触发错误事件。最常见的问题是:用户不允许你的 Web 应用创建数据库。IndexedDB 的核心设计目标之一,就是允许为离线使用存储大量数据。(关于各浏览器可用存储量,参见“浏览器存储配额与清理标准”中的[可存储多少数据?](/zh-CN/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria#how_much_data_can_be_stored)一文。) |
Contributor
Co-authored-by: Totoro-jam <moqiuchen66@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #35090