minor fixes

This commit is contained in:
Ilya Kantor 2021-03-13 15:57:12 +03:00
parent e4c769d17b
commit c3a9bbdf49
2 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,5 @@
There are no tricks here. Just replace `.catch` with `try...catch` inside `demoGithubUser` and add `async/await` where needed:
There are no tricks here. Just replace `.catch` with `try..catch` inside `demoGithubUser` and add `async/await` where needed:
```js run
class HttpError extends Error {

View file

@ -18,6 +18,12 @@ The native interface to IndexedDB, described in the specification <https://www.w
We can also use `async/await` with the help of a promise-based wrapper, like <https://github.com/jakearchibald/idb>. That's pretty convenient, but the wrapper is not perfect, it can't replace events for all cases. So we'll start with events, and then, after we gain an understanding of IndexedDb, we'll use the wrapper.
```smart header="Where's the data?"
Technically, the data is usually stored in the visitor's home directory, along with browser settings, extensions, etc.
Different browsers and OS-level users have each their own independant storage.
```
## Open database
To start working with IndexedDB, we first need to `open` (connect to) a database.