Skip to content

Commit

Permalink
remove superfluous language in Using Web Workers (mdn#8997)
Browse files Browse the repository at this point in the history
In the sentence `To illustrate this, let's create for didactical purpose a function named emulateMessage()`, "for didactical purpose" is an unusual and confusing phrase. luckily it's also unnecessary, since the beginning of the sentence "To illustrate this" conveys the same meaning already, ie "for example"
  • Loading branch information
chenders authored Sep 16, 2021
1 parent e90a3cb commit 9fa2479
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ The exception to this is if the worker script's origin is a globally unique iden

Data passed between the main page and workers is **copied**, not shared. Objects are serialized as they're handed to the worker, and subsequently, de-serialized on the other end. The page and worker **do not share the same instance**, so the end result is that **a duplicate** is created on each end. Most browsers implement this feature as [structured cloning](/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm).

To illustrate this, let's create for didactical purpose a function named `emulateMessage()`, which will simulate the behavior of a value that is _cloned and not shared_ during the passage from a `worker` to the main page or vice versa:
To illustrate this, let's create a function named `emulateMessage()`, which will simulate the behavior of a value that is _cloned and not shared_ during the passage from a `worker` to the main page or vice versa:

```js
function emulateMessage(vVal) {
Expand Down

0 comments on commit 9fa2479

Please sign in to comment.