diff --git a/files/en-us/web/css/css_animations/tips/index.md b/files/en-us/web/css/css_animations/tips/index.md index 5f7c0d75f0e48db..a8b987f2f6e950f 100644 --- a/files/en-us/web/css/css_animations/tips/index.md +++ b/files/en-us/web/css/css_animations/tips/index.md @@ -90,7 +90,7 @@ This looks weird, doesn't it? That's because the only way to play an animation a Here's what happens when the `play()` function gets called: 1. The box's list of CSS classes is reset to `"box"`. This has the effect of removing any other classes currently applied to the box, including the `"changing"` class that handles animation. In other words, we're removing the animation effect from the box. However, changes to the class list don't take effect until the style recomputation is complete and a refresh has occurred to reflect the change. -2. To be sure that the styles are recalculated, we use {{domxref("window.requestAnimationFrame()")}}, specifying a callback. Our callback gets executed just before the next repaint of the document. The problem for us is that because it's before the repaint, the style recomputation hasn't actually happened yet! So... +2. To be sure that the styles are recalculated, we use {{domxref("window.requestAnimationFrame()")}}, specifying a callback. Our callback gets executed just before the next repaint of the document. The problem for us is that because it's before the repaint, the style recomputation hasn't actually happened yet! 3. Our callback cleverly calls `requestAnimationFrame()` a second time! This time, the callback is run before the next repaint, which is after the style recomputation has occurred. This callback adds the `"changing"` class back onto the box, so that the repaint will start the animation once again. Of course, we also need to add an event handler to our "Run" button so it'll actually do something: diff --git a/files/en-us/web/css/css_colors/applying_color/index.md b/files/en-us/web/css/css_colors/applying_color/index.md index f70d0cc3c80a7ce..b75030bfe1c6aaf 100644 --- a/files/en-us/web/css/css_colors/applying_color/index.md +++ b/files/en-us/web/css/css_colors/applying_color/index.md @@ -365,7 +365,7 @@ The HTML here creates a box that contains a color picker control (with a label c #### CSS -The CSS establishes a size for the box and some basic styling for appearances. The border is also established with a 2-pixel width and a border color that won't last, courtesy of the JavaScript below\... +The CSS establishes a size for the box and some basic styling for appearances. The border is also established with a 2-pixel width and a border color. ```css #box { diff --git a/files/en-us/web/css/css_positioning/understanding_z_index/adding_z-index/index.md b/files/en-us/web/css/css_positioning/understanding_z_index/adding_z-index/index.md index 7a66bcdaa38d55f..e6a5f31651f4dd5 100644 --- a/files/en-us/web/css/css_positioning/understanding_z_index/adding_z-index/index.md +++ b/files/en-us/web/css/css_positioning/understanding_z_index/adding_z-index/index.md @@ -16,7 +16,7 @@ The first part of this article, [Stacking without the z-index property](/en-US/d The `z-index` property can be specified with an integer value (positive, zero, or negative), which represents the position of the element along the z-axis. If you are not familiar with the z-axis, imagine the page as a stack of layers, each one having a number. Layers are rendered in numerical order, with larger numbers above smaller numbers. - bottom layer _(farthest from the observer)_ -- ... +- … - Layer -3 - Layer -2 - Layer -1 @@ -24,7 +24,7 @@ The `z-index` property can be specified with an integer value (positive, zero, o - Layer 1 - Layer 2 - Layer 3 -- ... +- … - top layer _(closest to the observer)_ > **Note:** diff --git a/files/en-us/web/css/css_positioning/understanding_z_index/stacking_context_example_3/index.md b/files/en-us/web/css/css_positioning/understanding_z_index/stacking_context_example_3/index.md index 6057d2b303abb74..bbba778f1c4f19d 100644 --- a/files/en-us/web/css/css_positioning/understanding_z_index/stacking_context_example_3/index.md +++ b/files/en-us/web/css/css_positioning/understanding_z_index/stacking_context_example_3/index.md @@ -36,15 +36,15 @@ To better understand the situation, here is the stacking context hierarchy: - LEVEL #2 (z-index: 1) - LEVEL #3 - - ... + - … - LEVEL #3 - LEVEL #2 (z-index: 1) - - ... + - … - LEVEL #2 (z-index: 1) - LEVEL #1 - - ... + - … - LEVEL #1 This problem can be avoided by removing overlapping between different level menus, or by using individual (and different) `z-index` values assigned through the id selector instead of class selector, or by flattening the HTML hierarchy. diff --git a/files/en-us/web/css/position/index.md b/files/en-us/web/css/position/index.md index f31f4634cfd0986..f862643be75b485 100644 --- a/files/en-us/web/css/position/index.md +++ b/files/en-us/web/css/position/index.md @@ -254,13 +254,13 @@ Fixed positioning is similar to absolute positioning, with the exception that th ### Sticky positioning -Sticky positioning can be thought of as a hybrid of relative and fixed positioning when it nearest scrolling ancestor is viewport. A stickily positioned element is treated as relatively positioned until it crosses a specified threshold, at which point it is treated as fixed until it reaches the boundary of its parent. For instance... +Sticky positioning can be thought of as a hybrid of relative and fixed positioning when its nearest scrolling ancestor is the viewport. A stickily positioned element is treated as relatively positioned until it crosses a specified threshold, at which point it is treated as fixed until it reaches the boundary of its parent. For example: ```css #one { position: sticky; top: 10px; } ``` -...would position the element with id _one_ relatively until the viewport were scrolled such that the element would be less than 10 pixels from the top. Beyond that threshold, the element would be fixed to 10 pixels from the top. +The above CSS rule would position the element with id _one_ relatively until the viewport was scrolled such that the element would be less than 10 pixels from the top. Beyond that threshold, the element would be fixed to 10 pixels from the top. A common use for sticky positioning is for the headings in an alphabetized list. The "B" heading will appear just below the items that begin with "A" until they are scrolled offscreen. Rather than sliding offscreen with the rest of the content, the "B" heading will then remain fixed to the top of the viewport until all the "B" items have scrolled offscreen, at which point it will be covered up by the "C" heading, and so on. diff --git a/files/en-us/web/html/attributes/readonly/index.md b/files/en-us/web/html/attributes/readonly/index.md index 8555e5820d2e9ce..37f44f1a7f4f54d 100644 --- a/files/en-us/web/html/attributes/readonly/index.md +++ b/files/en-us/web/html/attributes/readonly/index.md @@ -38,7 +38,7 @@ The only way to modify dynamically the value of the readonly attribute is throug ### Usability -Browsers display the `readonly` attribute... +Browsers display the `readonly` attribute. ### Constraint validation diff --git a/files/en-us/web/html/element/base/index.md b/files/en-us/web/html/element/base/index.md index 4704f450096a62c..7de98b0f0de0dc0 100644 --- a/files/en-us/web/html/element/base/index.md +++ b/files/en-us/web/html/element/base/index.md @@ -85,11 +85,9 @@ If multiple `` elements are used, only the first `href` and first `target` ### In-page anchors -Links pointing to a fragment in the document — e.g. `` — are resolved with the ``, triggering an HTTP request to the base URL with the fragment attached. For example: +Links pointing to a fragment in the document — e.g. `` — are resolved with the ``, triggering an HTTP request to the base URL with the fragment attached. -1. Given `` -2. ...and this link: `To anchor` -3. ...the link points to `https://example.com/#anchor`. +For example, given `` and this link: `To anchor`. The link points to `https://example.com/#anchor`. ### Open Graph diff --git a/files/en-us/web/html/element/picture/index.md b/files/en-us/web/html/element/picture/index.md index 8acc423d1ce1e24..42be6a1d8f1fb94 100644 --- a/files/en-us/web/html/element/picture/index.md +++ b/files/en-us/web/html/element/picture/index.md @@ -119,7 +119,7 @@ If the {{HTMLElement("source")}}'s media condition evaluates to `false`, the bro The [{{htmlattrdef("srcset")}}](/en-US/docs/Web/HTML/Element/source#attr-srcset) attribute is used to offer list of possible images _based on size_. -It is composed of a comma-separated list of image descriptors. Each image descriptor is composed of a URL of the image, and _either..._ +It is composed of a comma-separated list of image descriptors. Each image descriptor is composed of a URL of the image, and _either_: - a _width descriptor_, followed by a `w` (such as `300w`); _OR_ diff --git a/files/en-us/web/http/link_prefetching_faq/index.md b/files/en-us/web/http/link_prefetching_faq/index.md index 52d814cd49b9004..1a75fdd3716242d 100644 --- a/files/en-us/web/http/link_prefetching_faq/index.md +++ b/files/en-us/web/http/link_prefetching_faq/index.md @@ -114,15 +114,6 @@ Browsers based on Mozilla 1.2 (or later), as well as browsers based on Mozilla 1 Along with the referral and URL-following implications already mentioned above, prefetching will generally cause the cookies of the prefetched site to be accessed. (For example, if you google amazon, the Google results page will prefetch `www.amazon.com`, causing amazon cookies to be sent back and forth. You can block 3rd party cookies in Firefox, see [Disabling third party cookies](https://support.mozilla.org/en-US/kb/third-party-cookies-firefox-tracking-protection).) -### What about...? - -If you have any questions or comments about link prefetching, please feel free to send them my way :-) - #### See also [Prefetching Hints](https://www.edochan.com/programming/pf.htm) - -## Original Document Information - -- Author(s): Darin Fisher (darin at meer dot net) -- Last Updated Date: Updated: March 3, 2003 diff --git a/files/en-us/web/javascript/guide/functions/index.md b/files/en-us/web/javascript/guide/functions/index.md index 8867e67507dbd6f..8e672aab17aa5df 100644 --- a/files/en-us/web/javascript/guide/functions/index.md +++ b/files/en-us/web/javascript/guide/functions/index.md @@ -271,7 +271,7 @@ Within the function body, the following are all equivalent: A function that calls itself is called a _recursive function_. In some ways, recursion is analogous to a loop. Both execute the same code multiple times, and both require a condition (to avoid an infinite loop, or rather, infinite recursion in this case). -For example, the following loop... +For example, consider the following loop: ```js let x = 0; @@ -281,7 +281,7 @@ while (x < 10) { // "x < 10" is the loop condition } ``` -...can be converted into a recursive function declaration, followed by a call to that function: +It can be converted into a recursive function declaration, followed by a call to that function: ```js function loop(x) { diff --git a/files/en-us/web/javascript/guide/numbers_and_dates/index.md b/files/en-us/web/javascript/guide/numbers_and_dates/index.md index e110f982574bc8e..0ed66a5ddb35103 100644 --- a/files/en-us/web/javascript/guide/numbers_and_dates/index.md +++ b/files/en-us/web/javascript/guide/numbers_and_dates/index.md @@ -134,7 +134,7 @@ The `Number` prototype provides methods for retrieving information from `Number` ## Math object -The built-in {{jsxref("Math")}} object has properties and methods for mathematical constants and functions. For example, the `Math` object's `PI` property has the value of pi (3.141...), which you would use in an application as +The built-in {{jsxref("Math")}} object has properties and methods for mathematical constants and functions. For example, the `Math` object's `PI` property has the value of pi (3.141…), which you would use in an application as ```js Math.PI diff --git a/files/en-us/web/javascript/guide/regular_expressions/cheatsheet/index.md b/files/en-us/web/javascript/guide/regular_expressions/cheatsheet/index.md index f9f3a4017f512be..4f8bfe0cecde7e7 100644 --- a/files/en-us/web/javascript/guide/regular_expressions/cheatsheet/index.md +++ b/files/en-us/web/javascript/guide/regular_expressions/cheatsheet/index.md @@ -518,9 +518,9 @@ This page provides an overall cheat sheet of all the capabilities of `RegExp` sy usually just the order of the capturing groups themselves. This becomes important when capturing groups are nested. Matches are accessed using the index of the result's elements ([1], ..., [n][1], …, [n]) or from the predefined RegExp object's properties - ($1, ..., $9). + ($1, …, $9).

Capturing groups have a performance penalty. If you don't need the @@ -567,8 +567,8 @@ This page provides an overall cheat sheet of all the capabilities of `RegExp` sy Non-capturing group: Matches "x" but does not remember the match. The matched substring cannot be recalled from the resulting - array's elements ([1], ..., [n]) or from the predefined - RegExp object's properties ($1, ..., $9). + array's elements ([1], …, [n]) or from the predefined + RegExp object's properties ($1, …, $9). diff --git a/files/en-us/web/javascript/guide/regular_expressions/groups_and_backreferences/index.md b/files/en-us/web/javascript/guide/regular_expressions/groups_and_backreferences/index.md index 1b6e54a04a6dd64..53ead0ca3fe4615 100644 --- a/files/en-us/web/javascript/guide/regular_expressions/groups_and_backreferences/index.md +++ b/files/en-us/web/javascript/guide/regular_expressions/groups_and_backreferences/index.md @@ -42,9 +42,9 @@ Groups group multiple patterns as a whole, and capturing groups provide extra su usually just the order of the capturing groups themselves. This becomes important when capturing groups are nested. Matches are accessed using the index of the result's elements ([1], ..., [n][1], …, [n]) or from the predefined RegExp object's properties - ($1, ..., $9). + ($1, …, $9).

Capturing groups have a performance penalty. If you don't need the @@ -91,8 +91,8 @@ Groups group multiple patterns as a whole, and capturing groups provide extra su Non-capturing group: Matches "x" but does not remember the match. The matched substring cannot be recalled from the resulting - array's elements ([1], ..., [n]) or from the predefined - RegExp object's properties ($1, ..., $9). + array's elements ([1], …, [n]) or from the predefined + RegExp object's properties ($1, …, $9). diff --git a/files/en-us/web/javascript/reference/errors/is_not_iterable/index.md b/files/en-us/web/javascript/reference/errors/is_not_iterable/index.md index e544bad38fd01e6..c28847796be05ad 100644 --- a/files/en-us/web/javascript/reference/errors/is_not_iterable/index.md +++ b/files/en-us/web/javascript/reference/errors/is_not_iterable/index.md @@ -168,4 +168,4 @@ Array.from(myEmptyIterable); // [] - {{jsxref("Object.entries")}} - {{jsxref("Map")}} - [generators](/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators#generators) -- [for…of](/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration#for...of_statement) +- [for...of](/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration#for...of_statement) diff --git a/files/en-us/web/javascript/reference/global_objects/array/index.md b/files/en-us/web/javascript/reference/global_objects/array/index.md index 5e569f6e5c9e29d..5993e5913aae9ba 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/index.md @@ -668,7 +668,7 @@ The properties and elements returned from this match are as follows: "dbBd" - [1], ...[n]
{{ReadOnlyInline}} + [1], …[n]
{{ReadOnlyInline}} Elements that specify the parenthesized substring matches (if included) in the regular expression. The number of possible parenthesized diff --git a/files/en-us/web/javascript/reference/global_objects/date/toutcstring/index.md b/files/en-us/web/javascript/reference/global_objects/date/toutcstring/index.md index 63f6586d96648ac..4bc367ec43311d0 100644 --- a/files/en-us/web/javascript/reference/global_objects/date/toutcstring/index.md +++ b/files/en-us/web/javascript/reference/global_objects/date/toutcstring/index.md @@ -36,9 +36,9 @@ Where: | Format String | Description | | ------------- | ------------------------------------------------------------ | -| `Www` | Day of week, as three letters (e.g. Sun, Mon, ...) | +| `Www` | Day of week, as three letters (e.g. Sun, Mon, …) | | `dd` | Day of month, as two digits with leading zero if required | -| `Mmm` | Month, as three letters (e.g. Jan, Feb, ...) | +| `Mmm` | Month, as three letters (e.g. Jan, Feb, …) | | `yyyy` | Year, as four or more digits with leading zeroes if required | | `hh` | Hour, as two digits with leading zero if required | | `mm` | Minute, as two digits with leading zero if required | diff --git a/files/en-us/web/javascript/reference/global_objects/intl/index.md b/files/en-us/web/javascript/reference/global_objects/intl/index.md index c5151655f20d051..f8c13e3f9cdbba0 100644 --- a/files/en-us/web/javascript/reference/global_objects/intl/index.md +++ b/files/en-us/web/javascript/reference/global_objects/intl/index.md @@ -63,7 +63,7 @@ A locale identifier is a string that consists of: 5. (optionally) one or more BCP 47 extension sequences, and 6. (optionally) a private-use extension sequence -...with all present subtags and sequences separated by hyphens. Locale identifiers are case-insensitive ASCII. However, it's conventional to use title case (first letter capitalized, successive letters lower case) for script subtags, upper case for region subtags, and lower case for everything else. For example: +Each subtag and sequence are separated by hyphens. Locale identifiers are case-insensitive ASCII. However, it's conventional to use title case (the first letter is capitalized, successive letters are lower case) for script subtags, upper case for region subtags, and lower case for everything else. For example: - "`hi`": Hindi (language) - "`de-AT`": German (language) as used in Austria (region) diff --git a/files/en-us/web/javascript/reference/global_objects/json/index.md b/files/en-us/web/javascript/reference/global_objects/json/index.md index 89ff76f14c01b0a..4823c718ba1dfe1 100644 --- a/files/en-us/web/javascript/reference/global_objects/json/index.md +++ b/files/en-us/web/javascript/reference/global_objects/json/index.md @@ -30,13 +30,9 @@ JavaScript is _not_ JSON. - **Numbers** - : Leading zeros are prohibited. A decimal point must be followed by at least one digit. `NaN` and `Infinity` are unsupported. -- **Any JSON text is a valid JavaScript expression...** - - : ...But only in JavaScript engines that have implemented - the [proposal to make all JSON text valid ECMA-262](https://github.com/tc39/proposal-json-superset). - In engines that haven't implemented the proposal, U+2028 LINE - SEPARATOR and U+2029 PARAGRAPH SEPARATOR are allowed in string literals and property - keys in JSON; but their use in these features in JavaScript string literals is a - {{jsxref("SyntaxError")}}. + +Any JSON text is a valid JavaScript expression, but only in JavaScript engines that have implemented the [proposal to make all JSON text valid ECMA-262](https://github.com/tc39/proposal-json-superset). +In engines that haven't implemented the proposal, U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR are allowed in string literals and property keys in JSON; but their use in these features in JavaScript string literals is a {{jsxref("SyntaxError")}}. Consider this example where {{jsxref("JSON.parse()")}} parses the string as JSON and {{jsxref("Global_Objects/eval", "eval")}} executes the string as JavaScript: diff --git a/files/en-us/web/javascript/reference/global_objects/math/log1p/index.md b/files/en-us/web/javascript/reference/global_objects/math/log1p/index.md index d734b033f136b3b..11470ecbc01ac3e 100644 --- a/files/en-us/web/javascript/reference/global_objects/math/log1p/index.md +++ b/files/en-us/web/javascript/reference/global_objects/math/log1p/index.md @@ -55,7 +55,7 @@ The natural logarithm (base {{jsxref("Math.E", "e")}}) of `1` plus the given num For very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off. -When you calculate log(1 + x) where x is a small positive number, you should get an answer very close to x, because limx0log(1+x)x=1\lim_{x \to 0} \frac{\log(1+x)}{x} = 1. If you calculate `Math.log(1 + 1.1111111111e-15)`, you should get an answer close to `1.1111111111e-15`. Instead, you will end up taking the logarithm of `1.00000000000000111022` (the roundoff is in binary, so sometimes it gets ugly), and get the answer 1.11022...e-15, with only 3 correct digits. If, instead, you calculate `Math.log1p(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111110999995e-15`, with 15 correct digits of precision (actually 16 in this case). +When you calculate log(1 + x) where x is a small positive number, you should get an answer very close to x, because limx0log(1+x)x=1\lim_{x \to 0} \frac{\log(1+x)}{x} = 1. If you calculate `Math.log(1 + 1.1111111111e-15)`, you should get an answer close to `1.1111111111e-15`. Instead, you will end up taking the logarithm of `1.00000000000000111022` (the roundoff is in binary, so sometimes it gets ugly), and get the answer 1.11022…e-15, with only 3 correct digits. If, instead, you calculate `Math.log1p(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111110999995e-15`, with 15 correct digits of precision (actually 16 in this case). If the value of `x` is less than -1, the return value is always {{jsxref("NaN")}}. diff --git a/files/en-us/web/javascript/reference/global_objects/object/tostring/index.md b/files/en-us/web/javascript/reference/global_objects/object/tostring/index.md index 720f8392128f939..a6a32606ee29582 100644 --- a/files/en-us/web/javascript/reference/global_objects/object/tostring/index.md +++ b/files/en-us/web/javascript/reference/global_objects/object/tostring/index.md @@ -28,7 +28,7 @@ A string representing the object. ## Description -An object's `toString()` method is most commonly invoked when that object undergoes... +An object's `toString()` method is most commonly invoked when that object undergoes: - explicit {{Glossary("type conversion")}} to a string (for example, `{{jsxref("String/String", "String")}}(myObject)`) - implicit {{Glossary("type coercion")}} into a string (for example, `myObject + "hello world"`) diff --git a/files/en-us/web/javascript/reference/global_objects/regexp/exec/index.md b/files/en-us/web/javascript/reference/global_objects/regexp/exec/index.md index 489ede4627a5c04..791b2769da807d3 100644 --- a/files/en-us/web/javascript/reference/global_objects/regexp/exec/index.md +++ b/files/en-us/web/javascript/reference/global_objects/regexp/exec/index.md @@ -87,7 +87,7 @@ The following table shows the state of `result` after running this script: "Quick Brown Fox Jumps" - [1], ...[n] + [1], …[n]

The parenthesized substring matches, if any.

The number of possible parenthesized substrings is unlimited.

diff --git a/files/en-us/web/javascript/reference/global_objects/regexp/n/index.md b/files/en-us/web/javascript/reference/global_objects/regexp/n/index.md index 925863c599660c9..6da2490146899b6 100644 --- a/files/en-us/web/javascript/reference/global_objects/regexp/n/index.md +++ b/files/en-us/web/javascript/reference/global_objects/regexp/n/index.md @@ -17,7 +17,7 @@ The legacy RegExp **$1, $2, $3, $4, $5, $6, $7, $8, $9** properties are static a ## Description -The $1, ..., $9 properties are static, they are not a property of an individual regular expression object. Instead, you always use them as `RegExp.$1`, ..., `RegExp.$9`. +The $1, …, $9 properties are static, they are not a property of an individual regular expression object. Instead, you always use them as `RegExp.$1`, …, `RegExp.$9`. The values of these properties are read-only and modified whenever successful matches are made. diff --git a/files/en-us/web/javascript/reference/global_objects/symbol/index.md b/files/en-us/web/javascript/reference/global_objects/symbol/index.md index bff3f77d151a623..34a6a01079edb5c 100644 --- a/files/en-us/web/javascript/reference/global_objects/symbol/index.md +++ b/files/en-us/web/javascript/reference/global_objects/symbol/index.md @@ -77,7 +77,7 @@ The method {{jsxref("Object.getOwnPropertySymbols()")}} returns an array of Symb ## Static properties -The static properties are all well-known Symbols. In these Symbols' descriptions, we will use language like "`Symbol.hasInstance` is a method determining...", but bear in mind that this is referring to the semantic of an object's method having this Symbol as the method name (because well-known Symbols act as "protocols"), not describing the value of the Symbol itself. +The static properties are all well-known Symbols. In these Symbols' descriptions, we will use language like "`Symbol.hasInstance` is a method determining…", but bear in mind that this is referring to the semantic of an object's method having this Symbol as the method name (because well-known Symbols act as "protocols"), not describing the value of the Symbol itself. - {{jsxref("Symbol.asyncIterator")}} - : A method that returns the default AsyncIterator for an object. Used by [`for await...of`](/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of). diff --git a/files/en-us/web/javascript/reference/global_objects/symbol/symbol/index.md b/files/en-us/web/javascript/reference/global_objects/symbol/symbol/index.md index f810d75df896483..b7f3cac7da0eef9 100644 --- a/files/en-us/web/javascript/reference/global_objects/symbol/symbol/index.md +++ b/files/en-us/web/javascript/reference/global_objects/symbol/symbol/index.md @@ -55,7 +55,7 @@ coerce the string `"foo"` into a symbol. It creates a new symbol each time: Symbol('foo') === Symbol('foo') // false ``` -### new Symbol(...) +### new Symbol() The following syntax with the {{jsxref("Operators/new", "new")}} operator will throw a {{jsxref("TypeError")}}: diff --git a/files/en-us/web/javascript/reference/operators/comma_operator/index.md b/files/en-us/web/javascript/reference/operators/comma_operator/index.md index bde766fe518edae..02595e82da1f1e6 100644 --- a/files/en-us/web/javascript/reference/operators/comma_operator/index.md +++ b/files/en-us/web/javascript/reference/operators/comma_operator/index.md @@ -30,7 +30,7 @@ expr1, expr2, expr3... ### Parameters -- `expr1`, `expr2`, `expr3`... +- `expr1`, `expr2`, `expr3`, … - : One or more expressions, the last of which is returned as the value of the compound expression. diff --git a/files/en-us/web/javascript/reference/statements/async_function/index.md b/files/en-us/web/javascript/reference/statements/async_function/index.md index 3b9c75606514273..06e4bdf49346220 100644 --- a/files/en-us/web/javascript/reference/statements/async_function/index.md +++ b/files/en-us/web/javascript/reference/statements/async_function/index.md @@ -58,7 +58,7 @@ Async functions can contain zero or more {{jsxref("Operators/await", "await")}} Async functions always return a promise. If the return value of an async function is not explicitly a promise, it will be implicitly wrapped in a promise. -For example, the following: +For example, consider the following code: ```js async function foo() { @@ -66,7 +66,7 @@ async function foo() { } ``` -...is similar to: +It is similar to: ```js function foo() { @@ -113,7 +113,7 @@ async function foo() { } ``` -...is equivalent to: +It is also equivalent to: ```js function foo() { diff --git a/files/en-us/web/javascript/reference/statements/import/index.md b/files/en-us/web/javascript/reference/statements/import/index.md index 82f3948af352d7c..9ced5b104ac71a9 100644 --- a/files/en-us/web/javascript/reference/statements/import/index.md +++ b/files/en-us/web/javascript/reference/statements/import/index.md @@ -63,7 +63,7 @@ all of them. Below are examples to clarify the syntax. `import` declarations are only permitted at the top-level of modules, and can only be present in module files. If an `import` declaration is encountered in non-module contexts (for example, script files, `eval`, `new Function`, which all have "script" or "function" as parsing goals), a `SyntaxError` is thrown. To load modules in non-module contexts, use the [dynamic import](/en-US/docs/Web/JavaScript/Reference/Operators/import) syntax instead. -`import` declarations are designed to be syntactically rigid (for example, only string literal specifiers, only permitted at top-level, all bindings must be identifiers...), which allows modules to be statically analyzed and synchronously linked before getting evaluated. This is the key to making modules asynchronous by nature, powering features like [top-level await](/en-US/docs/Web/JavaScript/Guide/Modules#top_level_await). +`import` declarations are designed to be syntactically rigid (for example, only string literal specifiers, only permitted at the top-level, as all bindings must be identifiers), which allows modules to be statically analyzed and synchronously linked before getting evaluated. This is the key to making modules asynchronous by nature, powering features like [top-level await](/en-US/docs/Web/JavaScript/Guide/Modules#top_level_await). ### Import an entire module's contents diff --git a/files/en-us/web/javascript/reference/statements/var/index.md b/files/en-us/web/javascript/reference/statements/var/index.md index e66fea5b695be15..70c9093530b7f7b 100644 --- a/files/en-us/web/javascript/reference/statements/var/index.md +++ b/files/en-us/web/javascript/reference/statements/var/index.md @@ -112,7 +112,7 @@ to a value, the scope chain is searched. This means that properties on the globa are conveniently visible from every scope, without having to qualify the names with `globalThis.` or `window.` or `global.`. -So you can just type: +Because the global object has a `String` property (`globalThis.hasOwnProperty('String')`), you can use the following code: ```js function foo() { @@ -120,10 +120,6 @@ function foo() { } ``` -...because - -```js -globalThis.hasOwnProperty('String') // true ``` So the global object will ultimately be searched for unqualified identifiers. You don't diff --git a/files/en-us/web/media/autoplay_guide/index.md b/files/en-us/web/media/autoplay_guide/index.md index 1bdaf70b5e7cd0c..26463c7cfb55c6f 100644 --- a/files/en-us/web/media/autoplay_guide/index.md +++ b/files/en-us/web/media/autoplay_guide/index.md @@ -185,7 +185,6 @@ let playAttempt = setInterval(() => { In the [Web Audio API](/en-US/docs/Web/API/Web_Audio_API), a web site or app can start playing audio using the `start()` method on a source node linked to the {{domxref("AudioContext")}}. Doing so outside the context of handling a user input event is subject to autoplay rules. -_More content will come soon; autoplay blocking is still being worked on at Mozilla. If others have it already, they are welcome to pitch in with this section..._ ## The autoplay feature policy diff --git a/files/en-us/web/media/formats/image_types/index.md b/files/en-us/web/media/formats/image_types/index.md index 903185a7362d792..10aeb0297ccbc6b 100644 --- a/files/en-us/web/media/formats/image_types/index.md +++ b/files/en-us/web/media/formats/image_types/index.md @@ -1244,7 +1244,7 @@ As such, TIFF files are not useful within the context of web content, _but_ it's Each pixel is an index into a ColorMap record, which defines the colors used in the image. The color map lists all of the red values, then all of the green values, then all of - the blue values (rather than rgb, rgb, rgb...). + the blue values (rather than rgb, rgb, rgb…). diff --git a/files/en-us/web/media/formats/support_issues/index.md b/files/en-us/web/media/formats/support_issues/index.md index bc135b1b5c8cb66..53974d5aa9c62be 100644 --- a/files/en-us/web/media/formats/support_issues/index.md +++ b/files/en-us/web/media/formats/support_issues/index.md @@ -52,7 +52,7 @@ When using a progressive image, the data is stored in such a way that the browse ## Checking compatibility in JavaScript -{{domxref("HTMLMediaElement.canPlayType")}} and {{domxref("MediaSource.isTypeSupported")}}... +{{domxref("HTMLMediaElement.canPlayType")}} and {{domxref("MediaSource.isTypeSupported")}}… ## Detecting playback errors diff --git a/files/en-us/web/performance/lazy_loading/index.md b/files/en-us/web/performance/lazy_loading/index.md index 009331d5edb92e4..80e61526c57e6c2 100644 --- a/files/en-us/web/performance/lazy_loading/index.md +++ b/files/en-us/web/performance/lazy_loading/index.md @@ -23,7 +23,7 @@ As the web has evolved, we have come to see huge increases in the number and siz Between 2011 and 2019, the median resource weight increased from **\~100KB** to **\~400KB** for desktop and **\~50KB** to **\~350KB** for mobile. While Image size has increased from **\~250KB** to **\~900KB** on desktop and **\~100KB** to **\~850KB** on mobile. One of the methods we can use to tackle this problem is to shorten the [Critical Rendering Path](/en-US/docs/Web/Performance/Critical_rendering_path) length by lazy loading resources that are not critical for the first render to happen. -A practical example would be when, you land on the home page of an e-commerce site which has a link to a cart page/section and all its resources (JS, CSS, images...) are downloaded **only** when the user navigates to that cart page. +A practical example would be when, you land on the home page of an e-commerce site which has a link to a cart page/section and all its resources (JS, CSS, images…) are downloaded **only** when the user navigates to that cart page. ## Strategies diff --git a/files/en-us/web/performance/optimizing_startup_performance/index.md b/files/en-us/web/performance/optimizing_startup_performance/index.md index fc09ea322ea4911..e5f731ad01c4e76 100644 --- a/files/en-us/web/performance/optimizing_startup_performance/index.md +++ b/files/en-us/web/performance/optimizing_startup_performance/index.md @@ -16,7 +16,7 @@ Instead, you should write your code so that your app creates a [Web worker](/en- Why is it important to be asynchronous? Other than the reasons suggested above, consider the impact of a non-responsive page or user interface. The user is unable to cancel if they launched your app by mistake. If the app is being run in a browser, it's possible the user may get an "unresponsive app" or "slow script" notification. You should present some kind of interface, such as a progress bar, so that the user knows how much longer they'll need to wait while your app starts up. -## Where there's a will... +## Where there's a will… If you're starting your project from scratch, it's usually pretty easy to just write everything the "right way," making appropriate bits of the code asynchronous. All pure startup calculations should be performed in background threads, while you keep the run-time of main thread events as short as possible. Include a progress indicator so the user knows what's going on and how long they'll be waiting. In theory, anyway, it should be pretty easy to design your new app to start up nicely. diff --git a/files/en-us/web/security/firefox_security_guidelines/index.md b/files/en-us/web/security/firefox_security_guidelines/index.md index 624bf7c1c4866a9..cf92fc9dc13508c 100644 --- a/files/en-us/web/security/firefox_security_guidelines/index.md +++ b/files/en-us/web/security/firefox_security_guidelines/index.md @@ -42,7 +42,7 @@ If so ensure they are safe and that no better alternatives are available. | Name | Risk Level | Problem | Solution | | ------------------------ | ---------- | ------------------------------------------------------------------ | --------------------------------------------------- | | eval | Very High | Invokes JavaScript parser - dangerous if used with untrusted input | Avoid eval if at all possible. | -| setTimeout(string, time) | Very High | Acts like eval | Use setTimeout(function, time, param1, param2, ...) | +| setTimeout(string, time) | Very High | Acts like eval | Use setTimeout(function, time, param1, param2, …) | ## C++ - Dangerous Functions diff --git a/files/en-us/web/security/subresource_integrity/index.md b/files/en-us/web/security/subresource_integrity/index.md index cac0394d1222403..d9a3fdfb85e5673 100644 --- a/files/en-us/web/security/subresource_integrity/index.md +++ b/files/en-us/web/security/subresource_integrity/index.md @@ -75,7 +75,7 @@ pause To use that code: 1. Save that code in a file named `sri-hash.bat` in the Windows SendTo folder in your environment (for example, `C:\Users\USER\AppData\Roaming\Microsoft\Windows\SendTo`). -2. Right-click a file in the File Explorer, select **Send to...**, and then select `sri-hash`. You will see the integrity value in a command box. +2. Right-click a file in the File Explorer, select **Send to…**, and then select `sri-hash`. You will see the integrity value in a command box. 3. Select the integrity value and right-click to copy it to the Clipboard. 4. Press any key to dismiss the command box. diff --git a/files/en-us/web/svg/svg_animation_with_smil/index.md b/files/en-us/web/svg/svg_animation_with_smil/index.md index 0a8083a677d028a..ea485ab11aff8c6 100644 --- a/files/en-us/web/svg/svg_animation_with_smil/index.md +++ b/files/en-us/web/svg/svg_animation_with_smil/index.md @@ -12,7 +12,7 @@ tags: Firefox 4 introduced support for animating [SVG](/en-US/docs/Web/SVG) using [Synchronized Multimedia Integration Language](https://www.w3.org/TR/REC-smil/) (SMIL). SMIL allows you to: -- animate the numeric attributes of an element (x, y, ...) +- animate the numeric attributes of an element (x, y, …) - animate transform attributes (translation or rotation) - animate color attributes - follow a motion path