Skip to content

Commit 6af9a2e

Browse files
committed
Correct mis-use of "it's"
1 parent ac7daa5 commit 6af9a2e

File tree

14 files changed

+29
-29
lines changed

14 files changed

+29
-29
lines changed

Diff for: 1-js/05-data-types/10-destructuring-assignment/article.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
The two most used data structures in JavaScript are `Object` and `Array`.
44

5-
- Objects allow us to create a single entity that stores data items by key.
5+
- Objects allow us to create a single entity that stores data items by key.
66
- Arrays allow us to gather data items into an ordered list.
77

88
Although, when we pass those to a function, it may need not be an object/array as a whole. It may need individual pieces.
99

10-
*Destructuring assignment* is a special syntax that allows us to "unpack" arrays or objects into a bunch of variables, as sometimes that's more convenient.
10+
*Destructuring assignment* is a special syntax that allows us to "unpack" arrays or objects into a bunch of variables, as sometimes that's more convenient.
1111

1212
Destructuring also works great with complex functions that have a lot of parameters, default values, and so on. Soon we'll see that.
1313

@@ -76,7 +76,7 @@ In the code above, the second element of the array is skipped, the third one is
7676
let [a, b, c] = "abc"; // ["a", "b", "c"]
7777
let [one, two, three] = new Set([1, 2, 3]);
7878
```
79-
That works, because internally a destructuring assignment works by iterating over the right value. It's kind of syntax sugar for calling `for..of` over the value to the right of `=` and assigning the values.
79+
That works, because internally a destructuring assignment works by iterating over the right value. It's a kind of syntax sugar for calling `for..of` over the value to the right of `=` and assigning the values.
8080
````
8181

8282

@@ -176,7 +176,7 @@ alert(rest.length); // 2
176176
*/!*
177177
```
178178

179-
The value of `rest` is the array of the remaining array elements.
179+
The value of `rest` is the array of the remaining array elements.
180180

181181
We can use any other variable name in place of `rest`, just make sure it has three dots before it and goes last in the destructuring assignment.
182182

@@ -254,7 +254,7 @@ alert(width); // 100
254254
alert(height); // 200
255255
```
256256

257-
Properties `options.title`, `options.width` and `options.height` are assigned to the corresponding variables.
257+
Properties `options.title`, `options.width` and `options.height` are assigned to the corresponding variables.
258258

259259
The order does not matter. This works too:
260260

@@ -429,7 +429,7 @@ let options = {
429429
height: 200
430430
},
431431
items: ["Cake", "Donut"],
432-
extra: true
432+
extra: true
433433
};
434434

435435
// destructuring assignment split in multiple lines for clarity

Diff for: 1-js/07-object-properties/02-property-accessors/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ There are two kinds of object properties.
55

66
The first kind is *data properties*. We already know how to work with them. All properties that we've been using until now were data properties.
77

8-
The second type of properties is something new. It's *accessor properties*. They are essentially functions that execute on getting and setting a value, but look like regular properties to an external code.
8+
The second type of property is something new. It's an *accessor property*. They are essentially functions that execute on getting and setting a value, but look like regular properties to an external code.
99

1010
## Getters and setters
1111

Diff for: 2-ui/1-document/04-searching-elements-dom/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Also, there's a global variable named by `id` that references the element:
5555
```
5656

5757
```warn header="Please don't use id-named global variables to access elements"
58-
This behavior is described [in the specification](http://www.whatwg.org/specs/web-apps/current-work/#dom-window-nameditem), so it's kind of standard. But it is supported mainly for compatibility.
58+
This behavior is described [in the specification](http://www.whatwg.org/specs/web-apps/current-work/#dom-window-nameditem), so it's a kind of standard. But it is supported mainly for compatibility.
5959
6060
The browser tries to help us by mixing namespaces of JS and DOM. That's fine for simple scripts, inlined into HTML, but generally isn't a good thing. There may be naming conflicts. Also, when one reads JS code and doesn't have HTML in view, it's not obvious where the variable comes from.
6161

Diff for: 2-ui/1-document/09-size-and-scroll/article.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ As a sample element to demonstrate properties we'll use the one given below:
1717
width: 300px;
1818
height: 200px;
1919
border: 25px solid #E8C48F;
20-
padding: 20px;
21-
overflow: auto;
20+
padding: 20px;
21+
overflow: auto;
2222
}
2323
</style>
2424
```
@@ -106,7 +106,7 @@ Geometry properties are calculated only for displayed elements.
106106
107107
If an element (or any of its ancestors) has `display:none` or is not in the document, then all geometry properties are zero (or `null` for `offsetParent`).
108108
109-
For example, `offsetParent` is `null`, and `offsetWidth`, `offsetHeight` are `0` when we created an element, but haven't inserted it into the document yet, or it (or it's ancestor) has `display:none`.
109+
For example, `offsetParent` is `null`, and `offsetWidth`, `offsetHeight` are `0` when we created an element, but haven't inserted it into the document yet, or it (or its ancestor) has `display:none`.
110110
111111
We can use this to check if an element is hidden, like this:
112112

Diff for: 2-ui/2-events/05-dispatch-events/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ Please note: the event must have the flag `cancelable: true`, otherwise the call
210210

211211
## Events-in-events are synchronous
212212

213-
Usually events are processed in a queue. That is: if the browser is processing `onclick` and a new event occurs, e.g. mouse moved, then it's handling is queued up, corresponding `mousemove` handlers will be called after `onclick` processing is finished.
213+
Usually events are processed in a queue. That is: if the browser is processing `onclick` and a new event occurs, e.g. mouse moved, then its handling is queued up, corresponding `mousemove` handlers will be called after `onclick` processing is finished.
214214

215215
The notable exception is when one event is initiated from within another one, e.g. using `dispatchEvent`. Such events are processed immediately: the new event handlers are called, and then the current event handling is resumed.
216216

Diff for: 2-ui/3-event-details/4-mouse-drag-and-drop/article.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ These are the basics. Later we'll see how to other features, such as highlightin
2323
Here's the implementation of dragging a ball:
2424

2525
```js
26-
ball.onmousedown = function(event) {
26+
ball.onmousedown = function(event) {
2727
// (1) prepare to moving: make absolute and on top by z-index
2828
ball.style.position = 'absolute';
2929
ball.style.zIndex = 1000;
3030

3131
// move it out of any current parents directly into body
3232
// to make it positioned relative to the body
33-
document.body.append(ball);
33+
document.body.append(ball);
3434

3535
// centers the ball at (pageX, pageY) coordinates
3636
function moveAt(pageX, pageY) {
@@ -93,7 +93,7 @@ So we should listen on `document` to catch it.
9393

9494
## Correct positioning
9595

96-
In the examples above the ball is always moved so, that it's center is under the pointer:
96+
In the examples above the ball is always moved so that its center is under the pointer:
9797

9898
```js
9999
ball.style.left = pageX - ball.offsetWidth / 2 + 'px';

Diff for: 2-ui/4-forms-controls/3-events-change-input/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ So the example above uses `document.getSelection()` to get the selected text. Yo
8585

8686
It's possible to copy/paste not just text, but everything. For instance, we can copy a file in the OS file manager, and paste it.
8787

88-
That's because `clipboardData` implements `DataTransfer` interface, commonly used for drag'n'drop and copy/pasting. It's bit beyond our scope now, but you can find its methods in the [DataTransfer specification](https://html.spec.whatwg.org/multipage/dnd.html#the-datatransfer-interface).
88+
That's because `clipboardData` implements `DataTransfer` interface, commonly used for drag'n'drop and copy/pasting. It's a bit beyond our scope now, but you can find its methods in the [DataTransfer specification](https://html.spec.whatwg.org/multipage/dnd.html#the-datatransfer-interface).
8989

9090
Also, there's an additional asynchronous API of accessing the clipboard: `navigator.clipboard`. More about it in the specification [Clipboard API and events](https://www.w3.org/TR/clipboard-apis/), [not supported by Firefox](https://caniuse.com/async-clipboard).
9191

Diff for: 3-frames-and-windows/01-popup-windows/article.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Settings for `params`:
8787

8888
There is also a number of less supported browser-specific features, which are usually not used. Check <a href="https://developer.mozilla.org/en/DOM/window.open">window.open in MDN</a> for examples.
8989

90-
## Example: a minimalistic window
90+
## Example: a minimalistic window
9191

9292
Let's open a window with minimal set of features, just to see which of them browser allows to disable:
9393

@@ -120,7 +120,7 @@ Rules for omitted settings:
120120

121121
## Accessing popup from window
122122

123-
The `open` call returns a reference to the new window. It can be used to manipulate it's properties, change location and even more.
123+
The `open` call returns a reference to the new window. It can be used to manipulate its properties, change location and even more.
124124

125125
In this example, we generate popup content from JavaScript:
126126

@@ -239,7 +239,7 @@ There's also `window.onscroll` event.
239239

240240
Theoretically, there are `window.focus()` and `window.blur()` methods to focus/unfocus on a window. And there are also `focus/blur` events that allow to catch the moment when the visitor focuses on a window and switches elsewhere.
241241

242-
Although, in practice they are severely limited, because in the past evil pages abused them.
242+
Although, in practice they are severely limited, because in the past evil pages abused them.
243243

244244
For instance, look at this code:
245245

@@ -257,10 +257,10 @@ Still, there are some use cases when such calls do work and can be useful.
257257

258258
For instance:
259259

260-
- When we open a popup, it's might be a good idea to run a `newWindow.focus()` on it. Just in case, for some OS/browser combinations it ensures that the user is in the new window now.
260+
- When we open a popup, it might be a good idea to run `newWindow.focus()` on it. Just in case, for some OS/browser combinations it ensures that the user is in the new window now.
261261
- If we want to track when a visitor actually uses our web-app, we can track `window.onfocus/onblur`. That allows us to suspend/resume in-page activities, animations etc. But please note that the `blur` event means that the visitor switched out from the window, but they still may observe it. The window is in the background, but still may be visible.
262262

263-
## Summary
263+
## Summary
264264

265265
Popup windows are used rarely, as there are alternatives: loading and displaying information in-page, or in iframe.
266266

Diff for: 3-frames-and-windows/03-cross-window-communication/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ Arguments:
275275
`targetOrigin`
276276
: Specifies the origin for the target window, so that only a window from the given origin will get the message.
277277

278-
The `targetOrigin` is a safety measure. Remember, if the target window comes from another origin, we can't read it's `location` in the sender window. So we can't be sure which site is open in the intended window right now: the user could navigate away, and the sender window has no idea about it.
278+
The `targetOrigin` is a safety measure. Remember, if the target window comes from another origin, we can't read its `location` in the sender window. So we can't be sure which site is open in the intended window right now: the user could navigate away, and the sender window has no idea about it.
279279

280280
Specifying `targetOrigin` ensures that the window only receives the data if it's still at the right site. Important when the data is sensitive.
281281

Diff for: 4-binary/01-arraybuffer-binary-arrays/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Let's eliminate a possible source of confusion. `ArrayBuffer` has nothing in com
3030
3131
**To manipulate an `ArrayBuffer`, we need to use a "view" object.**
3232
33-
A view object does not store anything on it's own. It's the "eyeglasses" that give an interpretation of the bytes stored in the `ArrayBuffer`.
33+
A view object does not store anything on its own. It's the "eyeglasses" that give an interpretation of the bytes stored in the `ArrayBuffer`.
3434
3535
For instance:
3636

Diff for: 5-network/04-fetch-abort/article.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ When `abort()` is called:
2424
- `controller.signal` emits the `"abort"` event.
2525
- `controller.signal.aborted` property becomes `true`.
2626

27-
Generally, we have two parties in the process:
27+
Generally, we have two parties in the process:
2828
1. The one that performs a cancelable operation, it sets a listener on `controller.signal`.
2929
2. The one that cancels: it calls `controller.abort()` when needed.
3030

@@ -34,7 +34,7 @@ Here's the full example (without `fetch` yet):
3434
let controller = new AbortController();
3535
let signal = controller.signal;
3636

37-
// The party that performs a cancelable operation
37+
// The party that performs a cancelable operation
3838
// gets the "signal" object
3939
// and sets the listener to trigger when controller.abort() is called
4040
signal.addEventListener('abort', () => alert("abort!"));
@@ -143,6 +143,6 @@ let results = await Promise.all([...fetchJobs, ourJob]);
143143

144144
## Summary
145145

146-
- `AbortController` is a simple object that generates an `abort` event on it's `signal` property when the `abort()` method is called (and also sets `signal.aborted` to `true`).
146+
- `AbortController` is a simple object that generates an `abort` event on its `signal` property when the `abort()` method is called (and also sets `signal.aborted` to `true`).
147147
- `fetch` integrates with it: we pass the `signal` property as the option, and then `fetch` listens to it, so it's possible to abort the `fetch`.
148148
- We can use `AbortController` in our code. The "call `abort()`" -> "listen to `abort` event" interaction is simple and universal. We can use it even without `fetch`.

Diff for: 5-network/06-fetch-api/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ The `integrity` option allows to check if the response matches the known-ahead c
179179
180180
As described in the [specification](https://w3c.github.io/webappsec-subresource-integrity/), supported hash-functions are SHA-256, SHA-384, and SHA-512, there might be others depending on the browser.
181181
182-
For example, we're downloading a file, and we know that it's SHA-256 checksum is "abcdef" (a real checksum is longer, of course).
182+
For example, we're downloading a file, and we know that its SHA-256 checksum is "abcdef" (a real checksum is longer, of course).
183183
184184
We can put it in the `integrity` option, like this:
185185

Diff for: 7-animation/3-js-animation/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Function `animate` accepts 3 parameters that essentially describes the animation
159159
}
160160
```
161161

162-
It's graph:
162+
Its graph:
163163
![](linear.svg)
164164

165165
That's just like `transition-timing-function: linear`. There are more interesting variants shown below.

Diff for: 9-regular-expressions/04-regexp-anchors/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The pattern `pattern:^Mary` means: "string start and then Mary".
1616
Similar to this, we can test if the string ends with `snow` using `pattern:snow$`:
1717

1818
```js run
19-
let str1 = "it's fleece was white as snow";
19+
let str1 = "its fleece was white as snow";
2020
alert( /snow$/.test(str1) ); // true
2121
```
2222

0 commit comments

Comments
 (0)