Correct mis-use of "it's"

This commit is contained in:
Dan Wallis 2022-04-13 11:43:59 +01:00
parent ac7daa516f
commit 6af9a2e2a4
No known key found for this signature in database
GPG key ID: 1CB3140D2C4E59EE
14 changed files with 29 additions and 29 deletions

View file

@ -24,7 +24,7 @@ When `abort()` is called:
- `controller.signal` emits the `"abort"` event.
- `controller.signal.aborted` property becomes `true`.
Generally, we have two parties in the process:
Generally, we have two parties in the process:
1. The one that performs a cancelable operation, it sets a listener on `controller.signal`.
2. The one that cancels: it calls `controller.abort()` when needed.
@ -34,7 +34,7 @@ Here's the full example (without `fetch` yet):
let controller = new AbortController();
let signal = controller.signal;
// The party that performs a cancelable operation
// The party that performs a cancelable operation
// gets the "signal" object
// and sets the listener to trigger when controller.abort() is called
signal.addEventListener('abort', () => alert("abort!"));
@ -143,6 +143,6 @@ let results = await Promise.all([...fetchJobs, ourJob]);
## Summary
- `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`).
- `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`).
- `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`.
- 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`.

View file

@ -179,7 +179,7 @@ The `integrity` option allows to check if the response matches the known-ahead c
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.
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).
For example, we're downloading a file, and we know that its SHA-256 checksum is "abcdef" (a real checksum is longer, of course).
We can put it in the `integrity` option, like this: