Skip to content
Closed
Changes from all commits
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
2 changes: 1 addition & 1 deletion 6-data-storage/03-indexeddb/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ db.createObjectStore(name[, keyOptions]);
db.createObjectStore('books', {keyPath: 'id'});
```

**在 `upgradeneeded` 处理程序中,只有在创建数据库版本时,对象库被才能被 创建/修改。**
**只有当数据库升级时,我们才能在`onupgradeneeded`事件的回调函数中创建或修改对象库。**

这是技术上的限制。在 upgradeneedHandler 之外,可以添加/删除/更新数据,但是只能在版本更新期间创建/删除/更改对象库。

Expand Down