This commit is contained in:
Ilya Kantor 2019-07-01 23:51:14 +03:00
parent 36bf2af5fd
commit 5c56e0d54b
7 changed files with 11 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 KiB

After

Width:  |  Height:  |  Size: 320 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 734 KiB

After

Width:  |  Height:  |  Size: 724 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 KiB

After

Width:  |  Height:  |  Size: 279 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 650 KiB

After

Width:  |  Height:  |  Size: 646 KiB

Before After
Before After

View file

@ -1,6 +1,6 @@
# Events: change, input, cut, copy, paste
Let's discuss various events that accompany data updates.
Let's cover various events that accompany data updates.
## Event: change

View file

@ -337,3 +337,13 @@ To schedule a new microtask:
There's no UI or network event handling between microtasks: they run immediately one after another.
So one may want to `queueMicrotask` to execute a function asynchronously, but also with the same application state.
```smart header="Web Workers"
For long heavy calculations that shouldn't block the event loop, we can use [Web Workers](https://html.spec.whatwg.org/multipage/workers.html).
That's a way to run code in another, parallel thread.
Web Workers can exchange messages with the main process, but they have their own variables, and their own event loop.
Web Workers do not have access to DOM, so they are useful, mainly, for calculations, to use multiplle CPU cores simultaneously.
```

Binary file not shown.