You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can find `readystatechange` listeners in really old code, for historical reasons.
206
+
You can find `readystatechange` listeners in really old code, it's there for historical reasons, as there was a time when there were no `load` and other events.
207
207
208
208
Nowadays, `load/error/progress` handlers deprecate it.
209
209
@@ -257,7 +257,7 @@ There are 3 methods for HTTP-headers:
257
257
Several headers are managed exclusively by the browser, e.g. `Referer` and `Host`.
258
258
The full list is [in the specification](http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader-method).
259
259
260
-
XMLHttpRequest is not allowed to change them, for the sake of user safety and correctness of the request.
260
+
`XMLHttpRequest` is not allowed to change them, for the sake of user safety and correctness of the request.
261
261
```
262
262
263
263
````warn header="Can't remove a header"
@@ -325,7 +325,7 @@ let formData = new FormData([form]); // creates an object, optionally fill from
325
325
formData.append(name, value); // appends a field
326
326
```
327
327
328
-
Create it, optionally from a form, `append` more fields if needed, and then:
328
+
We create it, optionally from a form, `append` more fields if needed, and then:
329
329
330
330
1. `xhr.open('POST', ...)` – use `POST` method.
331
331
2. `xhr.send(formData)` to submit the form to the server.
Copy file name to clipboardExpand all lines: 9-regular-expressions/09-regexp-groups/article.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -237,6 +237,6 @@ Parentheses groups are numbered left-to-right, and can optionally be named with
237
237
238
238
The content, matched by a group, can be referenced both in the replacement string as `$1`, `$2` etc, or by the name `$name` if named.
239
239
240
-
So, parentheses groups are called "capturing groups", as they "capture" a part of the match. We get that part separately from the result.
240
+
So, parentheses groups are called "capturing groups", as they "capture" a part of the match. We get that part separately from the result as a member of the array or in `.groups` if it's named.
241
241
242
242
We can exclude the group from remembering (make in "non-capturing") by putting `?:` at the start: `(?:...)`, that's used if we'd like to apply a quantifier to the whole group, but don't need it in the result.
0 commit comments