From f87c20f09c6acaef57b33b5a4364eb8cf41beafd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vlad-=C8=98tefan=20Harbuz?= <291640+vladh@users.noreply.github.com> Date: Tue, 5 Sep 2023 00:30:47 +0100 Subject: [PATCH 01/94] modulepreload: add links (#28921) `use-credentials` has a link, so `anonymous` and `""` should too. --- files/en-us/web/html/attributes/rel/modulepreload/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/html/attributes/rel/modulepreload/index.md b/files/en-us/web/html/attributes/rel/modulepreload/index.md index b8b1fb71d9818ba..42f41fa9c6086ea 100644 --- a/files/en-us/web/html/attributes/rel/modulepreload/index.md +++ b/files/en-us/web/html/attributes/rel/modulepreload/index.md @@ -18,7 +18,7 @@ Links with `rel="modulepreload"` are similar to those with [`rel="preload"`](/en The main difference is that `preload` just downloads the file and stores it in the cache, while `modulepreload` gets the module, parses and compiles it, and puts the results into the module map so that it is ready to execute. When using `modulepreload` the fetch request mode is always [`cors`](/en-US/docs/Web/API/Request/mode#cors), and the [`crossorigin`](/en-US/docs/Web/HTML/Attributes/crossorigin) property is used to determine the request [credential mode](/en-US/docs/Web/API/Request/credentials). -If `crossorigin` is set to `anonymous` or `""` (default), then the credentials mode is [`same-origin`](/en-US/docs/Web/API/Request/credentials#same-origin), and user credentials such as cookies and authentication are only sent for requests with the `same-origin`. +If `crossorigin` is set to [`anonymous`](/en-US/docs/Web/HTML/Attributes/crossorigin#anonymous) or [`""`](/en-US/docs/Web/HTML/Attributes/crossorigin#sect1) (default), then the credentials mode is [`same-origin`](/en-US/docs/Web/API/Request/credentials#same-origin), and user credentials such as cookies and authentication are only sent for requests with the `same-origin`. If `crossorigin` is set to [`use-credentials`](/en-US/docs/Web/HTML/Attributes/crossorigin#use-credentials) then the credentials mode is [`include`](/en-US/docs/Web/API/Request/credentials#include), and user credentials for both single- and cross-origin requests. The [`as`](/en-US/docs/Web/HTML/Element/link#as) attribute is optional for links with `rel="modulepreload"`, and defaults to `"script"`. From 062f3961a28054b72c7d406b46867c87208a68b0 Mon Sep 17 00:00:00 2001 From: Brian Thomas Smith Date: Tue, 5 Sep 2023 01:33:45 +0200 Subject: [PATCH 02/94] Fx(117): examples for 'auto none' in 'contain-intrinsic-size' CSS prop (#28618) * relnote(117): 'auto none' allowed for 'contain-intrinsic-size' CSS prop * relnote(117): 'auto none' value pair for 'contain-intrinsic-size' example * relnote(117): 'auto none' value pair for 'contain-intrinsic-size' example * relnote(117): minor reword for readability * Update files/en-us/web/css/contain-intrinsic-size/index.md Co-authored-by: Hamish Willee * relnote(117): 'auto none' value pair improvements following reviewer feedback * relnote(117): add support rule for unsupported styles * Apply suggestions from code review Co-authored-by: Hamish Willee * relnote(117): 'auto none' value pair improvements following reviewer feedback * relnote(117): move supports note to relevant sections * Update files/en-us/web/css/contain-intrinsic-size/index.md Co-authored-by: Hamish Willee --------- Co-authored-by: Hamish Willee --- .../mozilla/firefox/releases/117/index.md | 4 +- .../web/css/contain-intrinsic-size/index.md | 178 +++++++++++++++++- 2 files changed, 176 insertions(+), 6 deletions(-) diff --git a/files/en-us/mozilla/firefox/releases/117/index.md b/files/en-us/mozilla/firefox/releases/117/index.md index 225e2db60dfecfe..87bbe9954c12df2 100644 --- a/files/en-us/mozilla/firefox/releases/117/index.md +++ b/files/en-us/mozilla/firefox/releases/117/index.md @@ -20,8 +20,8 @@ No notable changes. - The [`math-style`](/en-US/docs/Web/CSS/math-style) and [`math-depth`](/en-US/docs/Web/CSS/math-depth) properties are now supported, as well as the `math` value for the [`font-size`](/en-US/docs/Web/CSS/font-size#values) property ([Firefox bug 1845516](https://bugzil.la/1845516)). -- The [`contain-intrinsic-size: auto none;`](/en-US/docs/Web/CSS/contain-intrinsic-size) syntax is now supported, which allows for using the last-remembered size of an element if possible and falls back to `contain-intrinsic-size: none` otherwise. - This is useful in layouts using proportional sizes, such as grid or multi-column ([Firefox bug 1835813](https://bugzil.la/1835813)). +- The [`contain-intrinsic-size: auto none`](/en-US/docs/Web/CSS/contain-intrinsic-size) syntax is now supported, which allows for using the last-remembered size of an element if possible and falls back to `contain-intrinsic-size: none` otherwise. + This is useful for grid and multi-column layouts to allow elements to be laid out as though they have no contents instead of 0px height ([Firefox bug 1835813](https://bugzil.la/1835813)). ### JavaScript diff --git a/files/en-us/web/css/contain-intrinsic-size/index.md b/files/en-us/web/css/contain-intrinsic-size/index.md index 31f162d14d4c255..0c617336d13291d 100644 --- a/files/en-us/web/css/contain-intrinsic-size/index.md +++ b/files/en-us/web/css/contain-intrinsic-size/index.md @@ -31,6 +31,7 @@ contain-intrinsic-size: 1000px 1.5em; /* auto */ contain-intrinsic-size: auto 300px; +contain-intrinsic-size: auto none; /* auto width | auto height */ contain-intrinsic-size: auto 300px auto 4rem; @@ -45,16 +46,20 @@ contain-intrinsic-size: unset; ### Values -Either one or two of the following values may be specified for an element. -If two values are specified, the first value applies to the width, and the second to the height. -If a single value is specified, it applies to both width and height. +The following values may be specified for the `contain-intrinsic-size` property: - `none` - : The element has no intrinsic size in the given dimension(s). - `` - : The element has the specified {{cssxref("<length>")}} in the given dimension(s). -- `auto ` +- `auto [ | none]` - : A remembered value of the "normally rendered" element size if one exists and the element is skipping its contents (for example, when it is offscreen); otherwise the specified ``. + The `none` keyword may be used in place of `` where `0px` fixed lengths behave differently than `none` (such as in multi column, or grid layouts). + +If one value is provided as a keyword, a length or an `auto [ | none]` pair, it applies to both width and height. + +Two length values may be specified, which apply to the width and height in that order. +If two `auto [ | none]` pairs are specified, the first pair applies to the width, and the second to the height. ## Description @@ -68,6 +73,10 @@ The `auto ` value allows the size of the element to be stored if the ele This allows offscreen elements with [`content-visibility: auto`](/en-US/docs/Web/CSS/content-visibility) to benefit from size containment without developers having to be as precise in their estimates of element size. The remembered value is not used if the child elements are being rendered (if size containment is enabled, the `` will be used). +In grid and multi column layouts, an explicit size is treated differently than implicit content-based height. +Elements might lay out substantially differently than it would have were it simply filled with content up to that height. +The `auto none` value allows the element to fallback to `contain-intrinsic-size: none` if no remembered value exists, which will allow the element to be laid out as though it had no contents. This is almost always preferred to setting 0px as the intrinsic size in grid and multi column layouts, where contained elements may overflow their parents and can result in unexpected page layout. + ## Formal definition {{cssinfo}} @@ -78,6 +87,167 @@ The remembered value is not used if the child elements are being rendered (if si ## Examples +### Using auto value pairs for intrinsic size + +This example demonstrates `contain-intrinsic-size: auto ` and `contain-intrinsic-size: auto none`, using a layout where there are many elements displayed vertically that have both accurate and incorrect intrinsic size estimations. +Using `content-visibility: auto` skips rendering elements when they are offscreen, so this property is a good candidate to combine with `contain-intrinsic-size` to improve rendering performance and minimize [reflows](/en-US/docs/Glossary/Reflow). + +The `contain-intrinsic-size: auto 500px` value pair tells the browser to use 500px as a kind of 'placeholder' size (width and height) for the element when it is offscreen and the page is being laid out. +When the user scrolls to the element and it needs to be displayed, the browser will calculate the actual size of the element and its contents. +If there is a difference between the placeholder and calculated size this might force a new layout, with accompanying changes to the sidebar position. + +Once the browser has actual size information for the element, it will remember this size when the element scrolls offscreen again, and use the remembered size for layout calculations instead of the placeholder value. +The benefit is that the browser does not need to repeatedly render the element contents to calculate its size and is especially useful when the contents are complex or depend on network resources or JavaScript. + +#### HTML + +```html +
+
+

+ Your browser does not support + contain-intrinsic-size: auto <length>. +

+
+
+

Item one

+
+
+

Item two

+
+
+

Item three

+
+
+

Item four

+
+
+

+ Your browser does not support + contain-intrinsic-size: auto none. +

+
+
+

Item five

+
+
+

Item six

+
+
+``` + +#### CSS + +```css hidden +div, +p { + padding: 1rem; + margin-bottom: 1rem; + font-size: 2rem; + font-family: sans-serif; +} + +code { + background-color: lightgray; + padding: 0.25rem; + border-radius: 0.25rem; +} + +#container { + width: 90%; + height: 80%; +} + +.auto-length, +.auto-length.none { + display: none; +} + +#auto-length-note, +#auto-none-note { + display: block; + padding: 0; +} + +#auto-length-note p, +#auto-none-note p { + padding: 0.5rem; + width: 100%; + height: max-content; + font-size: 1rem; + line-height: 1.5rem; + background-color: tomato; +} + +@supports (contain-intrinsic-size: auto none) { + .auto-length.none { + display: block; + } + #auto-none-note { + display: none; + } +} +@supports (contain-intrinsic-size: auto 500px) { + .auto-length { + display: block; + } + #auto-length-note { + display: none; + } +} +``` + +```css +p { + height: 500px; + width: 500px; + border: 4px dotted; + background: lightblue; +} + +.auto-length { + content-visibility: auto; + contain-intrinsic-size: auto 500px; + background-color: linen; + outline: 4px dotted blue; +} + +.large-intrinsic-size { + /* Setting an inaccurate intrinsic size for the element */ + contain-intrinsic-size: auto 5000px; + background-color: lightgray; + outline: 4px dotted red; +} + +.small { + /* This element is a lot smaller than expected */ + height: 100px; + width: 100px; +} + +.none { + background-color: papayawhip; + contain-intrinsic-size: auto none; + outline: 4px dotted red; +} +``` + +#### Result + +- The first two boxes have an intrinsic size that matches their actual size, so as they flow into view, the layout is recalculated but we see no change in the scrollbar or the scroll position. + +- The third and fourth boxes have a huge intrinsic size, so the initial layout that the browser calculated is far too big, and we've made these boxes smaller so that it's obvious when you've reached a point that forces a drastic layout change. + + When the third and fourth boxes scroll into view, the size is recalculated, making the box and its parent less tall. + The effect is that the scroller jumps down the page (we've effectively scrolled further through the box than we'd estimated) and the scroller is longer, because the entire page is less tall than we'd estimated. + +- The last boxes have `auto none`, so they have zero estimated size. + When they scroll into view the size of the element and its parent are recalculated to be much larger, so the scroller decreases in size and moves up the bar. + +After scrolling all the way to the bottom you can subsequently scroll up and down smoothly, because using `content-visibility: auto` saves the actual rendered size of the element for next time it is displayed. + +{{EmbedLiveSample('Using_auto_value_pairs_for_intrinsic_size', 800, 400)}} + ### Setting the intrinsic size This example provides selection lists that can be used to modify `contain-intrinsic-size`, `content-visibility` and `contain` on an element in order to observe the effect of the different settings. From 1bf44d97042f4b409c57e129c108ae8239698629 Mon Sep 17 00:00:00 2001 From: MDN Web Docs GitHub Bot <108879845+mdn-bot@users.noreply.github.com> Date: Tue, 5 Sep 2023 04:34:47 +0200 Subject: [PATCH 03/94] Markdownlint auto-cleanup (#28936) chore: auto-fix Markdownlint issues --- files/en-us/web/css/filter-function/blur/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/css/filter-function/blur/index.md b/files/en-us/web/css/filter-function/blur/index.md index e6191a688f776fd..409bea22cc2cb13 100644 --- a/files/en-us/web/css/filter-function/blur/index.md +++ b/files/en-us/web/css/filter-function/blur/index.md @@ -119,7 +119,7 @@ svg:not([height]) { ## See also -- [CSS filter effects](/en-US/docs/Web/CSS/filter_effects) module +- [CSS filter effects](/en-US/docs/Web/CSS/CSS_filter_effects) module - The other {{cssxref("<filter-function>")}} functions available to be used in values of the {{cssxref("filter")}} and {{cssxref("backdrop-filter")}} properties include: - {{cssxref("filter-function/brightness", "brightness()")}} - {{cssxref("filter-function/contrast", "contrast()")}} From a9ba751cdf7533f51888cb37210cc6498c453776 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Tue, 5 Sep 2023 00:03:01 -0400 Subject: [PATCH 04/94] Normalize Intl constructor options representation (#28594) --- .../intl/collator/collator/index.md | 134 +++++------------- .../datetimeformat/datetimeformat/index.md | 2 +- .../intl/displaynames/displaynames/index.md | 72 +++------- .../durationformat/durationformat/index.md | 2 +- .../intl/listformat/listformat/index.md | 44 +++--- .../relativetimeformat/index.md | 2 +- .../intl/segmenter/segmenter/index.md | 21 +-- 7 files changed, 93 insertions(+), 184 deletions(-) diff --git a/files/en-us/web/javascript/reference/global_objects/intl/collator/collator/index.md b/files/en-us/web/javascript/reference/global_objects/intl/collator/collator/index.md index 38ee79977ac0c12..bccbd455d6573cf 100644 --- a/files/en-us/web/javascript/reference/global_objects/intl/collator/collator/index.md +++ b/files/en-us/web/javascript/reference/global_objects/intl/collator/collator/index.md @@ -29,125 +29,59 @@ Intl.Collator(locales, options) - `locales` {{optional_inline}} - - : A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the `locales` argument, see [the parameter description on the `Intl` main page](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + - : A string with a BCP 47 language tag or an {{jsxref("Intl.Locale")}} instance, or an array of such locale identifiers. For the general form and interpretation of the `locales` argument, see [the parameter description on the `Intl` main page](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). The following Unicode extension keys are allowed: - > **Note:** These keys can usually also be set with `options` (as listed - > below). When both are set, the `options` property takes - > precedence. - - `co` - - - : Variant collations for certain locales. Possible values include: - - - `big5han` (Chinese; do not use; not available in Firefox, Chrome or Edge) - - `compat` (Arabic) - - `dict` (Sinhala) - - `direct` (deprecated, do not use) - - `ducet` (not available, do not use) - - `emoji` (root) - - `eor` (root) - - `gb2312` (Chinese; do not use; not available in Chrome or Edge) - - `phonebk` (German) - - `phonetic` (Lingala) - - `pinyin` (Chinese) - - `reformed` (formerly Swedish; do not specify explicitly as this was the old name for the default for Swedish) - - `searchjl` (Korean; this is not for sorting, but for search matching such that syllable-initial consonants are matched and vowels and possible syllable-final consonants are ignored) - - `stroke` (Chinese) - - `trad` - - `unihan` (Chinese, Japanese, and Korean; not available in Chrome or Edge) - - `zhuyin` (Chinese) - - This option can be also be set through the `options` property `collation`. - + - : See [`collation`](#collation). - `kn` - - : Whether numeric collation should be used, such that "1" < "2" < - "10". Possible values are `"true"` and `"false"`. - This option can be also be set through the `options` - property `numeric`. + - : See [`numeric`](#numeric). - `kf` - - : Whether upper case or lower case should sort first. Possible values are - `"upper"`, `"lower"`, or `"false"` (use - the locale's default). This option can be also be set through the - `options` property `caseFirst`. + - : See [`caseFirst`](#casefirst). + + These keys can also be set with `options` (as listed below). When both are set, the `options` property takes precedence. - `options` {{optional_inline}} - - : An object with some or all of the following properties: + - : An object containing the following properties, in the order they are retrieved (all of them are optional): - - `localeMatcher` - - : The locale matching algorithm to use. Possible values are - `"lookup"` and `"best fit"`; the default is - `"best fit"`. For information about this option, see the - {{jsxref("Global_Objects/Intl", "Intl", "#locale_identification_and_negotiation", 1)}} page. - `usage` - - : Whether the comparison is for sorting a list of strings or fuzzy (for the Latin script diacritic-insensitive and case-insensitive) filtering a list of strings by key. Possible values are `"sort"` and `"search"`; the default is `"sort"` for sorting a list of strings. `"search"` is for filtering a list of strings by testing each list item for a full-string match against a key. With `"search"`, the caller should only pay attention to whether `compare()` returns zero or non-zero and should not distinguish the non-zero return values from each other. That is, it is inappropriate to use `"search"` for sorting/ordering. + - : Whether the comparison is for sorting a list of strings or fuzzy (for the Latin script diacritic-insensitive and case-insensitive) filtering a list of strings by key. Possible values are: + - `"sort"` (default) + - : For sorting a list of strings. + - `"search"` + - : For filtering a list of strings by testing each list item for a full-string match against a key. With `"search"`, the caller should only pay attention to whether `compare()` returns zero or non-zero and should not distinguish the non-zero return values from each other. That is, it is inappropriate to use `"search"` for sorting/ordering. + - `localeMatcher` + - : The locale matching algorithm to use. Possible values are `"lookup"` and `"best fit"`; the default is `"best fit"`. For information about this option, see [Locale identification and negotiation](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation). + - `collation` + - : Variant collations for certain locales. For a list of supported collation types, see [`Intl.Locale.prototype.getCollations()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCollations#supported_collation_types); the default is `"default"`. This option can also be set through the `co` Unicode extension key; if both are provided, this `options` property takes precedence. + - `numeric` + - : Whether numeric collation should be used, such that "1" < "2" < "10". Possible values are `true` and `false`; the default is `false`. This option can also be set through the `kn` Unicode extension key; if both are provided, this `options` property takes precedence. + - `caseFirst` + - : Whether upper case or lower case should sort first. Possible values are `"upper"`, `"lower"`, and `"false"` (use the locale's default); the default is `"false"`. This option can also be set through the `kf` Unicode extension key; if both are provided, this `options` property takes precedence. - `sensitivity` - - : Which differences in the strings should lead to non-zero result values. - Possible values are: - - - `"base"`: Only strings that differ in base letters - compare as unequal. Examples: a ≠ b, a = á, a = A. - - `"accent"`: Only strings that differ in base letters or - accents and other diacritic marks compare as unequal. Examples: a - ≠ b, a ≠ á, a = A. - - `"case"`: Only strings that differ in base letters or - case compare as unequal. Examples: a ≠ b, a = á, a ≠ A. - - `"variant"`: Strings that differ in base letters, - accents and other diacritic marks, or case compare as unequal. - Other differences may also be taken into consideration. Examples: - a ≠ b, a ≠ á, a ≠ A. + - : Which differences in the strings should lead to non-zero result values. Possible values are: + + - `"base"` + - : Only strings that differ in base letters compare as unequal. Examples: a ≠ b, a = á, a = A. + - `"accent"` + - : Only strings that differ in base letters or accents and other diacritic marks compare as unequal. Examples: a ≠ b, a ≠ á, a = A. + - `"case"` + - : Only strings that differ in base letters or case compare as unequal. Examples: a ≠ b, a = á, a ≠ A. + - `"variant"` + - : Strings that differ in base letters, accents and other diacritic marks, or case compare as unequal. Other differences may also be taken into consideration. Examples: a ≠ b, a ≠ á, a ≠ A. The default is `"variant"` for usage `"sort"`; it's locale dependent for usage `"search"` per spec, but the core functionality of `"search"` is accent-insensitive and case-insensitive filtering, so `"base"` makes the most sense (and perhaps `"case"`). - `ignorePunctuation` - - : Whether punctuation should be ignored. Possible values are - `true` and `false`; the default is - `false`. - - `numeric` - - - : Whether numeric collation should be used, such that "1" < "2" < - "10". Possible values are `true` and `false`; the - default is `false`. - This option can also be set through the `kn` Unicode - extension key; if both are provided, this `options` - property takes precedence. + - : Whether punctuation should be ignored. Possible values are `true` and `false`; the default is `false`. - - `caseFirst` - - - : Whether upper case or lower case should sort first. Possible values are - `"upper"`, `"lower"`, or `"false"` (use the locale's default). - This option can also be set through the `kf` Unicode - extension key; if both are provided, this `options` - property takes precedence. - - - `collation` +### Exceptions - - : Variant collations for certain locales. Possible values include: - - - `big5han` (Chinese; do not use; not available in Firefox, Chrome or Edge) - - `compat` (Arabic) - - `dict` (Sinhala) - - `direct` (deprecated, do not use) - - `ducet` (not available, do not use) - - `emoji` (root) - - `eor` (root) - - `gb2312` (Chinese; do not use; not available in Firefox, Chrome or Edge) - - `phonebk` (German) - - `phonetic` (Lingala) - - `pinyin` (Chinese) - - `reformed` (formerly Swedish; do not specify explicitly as this was the old name for the default for Swedish) - - `searchjl` (Korean; this is not for sorting, but for search matching such that syllable-initial consonants are matched and vowels and possible syllable-final consonants are ignored) - - `stroke` (Chinese) - - `trad` - - `unihan` (Chinese, Japanese, and Korean; not available in Chrome or Edge) - - `zhuyin` (Chinese) - - This option can also be set through the `co` Unicode - extension key; if both are provided, this `options` - property takes precedence. +- {{jsxref("RangeError")}} + - : Thrown if `locales` or `options` contain invalid values. ## Examples diff --git a/files/en-us/web/javascript/reference/global_objects/intl/datetimeformat/datetimeformat/index.md b/files/en-us/web/javascript/reference/global_objects/intl/datetimeformat/datetimeformat/index.md index 5341d782fe15db8..d64639cff16f7b4 100644 --- a/files/en-us/web/javascript/reference/global_objects/intl/datetimeformat/datetimeformat/index.md +++ b/files/en-us/web/javascript/reference/global_objects/intl/datetimeformat/datetimeformat/index.md @@ -186,7 +186,7 @@ This behavior, called `ChainDateTimeFormat`, does not happen when `Intl.DateTime ### Exceptions - {{jsxref("RangeError")}} - - : If `locales` or `options` contain invalid values. + - : Thrown if `locales` or `options` contain invalid values. ## Examples diff --git a/files/en-us/web/javascript/reference/global_objects/intl/displaynames/displaynames/index.md b/files/en-us/web/javascript/reference/global_objects/intl/displaynames/displaynames/index.md index d91d2a16c6f1950..80c5421cfaa95bc 100644 --- a/files/en-us/web/javascript/reference/global_objects/intl/displaynames/displaynames/index.md +++ b/files/en-us/web/javascript/reference/global_objects/intl/displaynames/displaynames/index.md @@ -22,60 +22,34 @@ new Intl.DisplayNames(locales, options) ### Parameters - `locales` - - - : A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the `locales` argument, see [the parameter description on the `Intl` main page](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). The following Unicode extension key is allowed: - - - `nu` - - : The numbering system to be used. Possible values include: - `"arab"`, `"arabext"`, `"bali"`, - `"beng"`, `"deva"`, `"fullwide"`, - `"gujr"`, `"guru"`, `"hanidec"`, - `"khmr"`, `"knda"`, `"laoo"`, - `"latn"`, `"limb"`, `"mlym"`, - `"mong"`, `"mymr"`, `"orya"`, - `"tamldec"`, `"telu"`, `"thai"`, - `"tibt"`. - + - : A string with a BCP 47 language tag or an {{jsxref("Intl.Locale")}} instance, or an array of such locale identifiers. For the general form and interpretation of the `locales` argument, see [the parameter description on the `Intl` main page](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). - `options` - - - : An object with some or all of the following properties: - - - `localeMatcher` - - : The locale matching algorithm to use. Possible values are - `"lookup"` and `"best fit"`; the default is - `"best fit"`. For information about this option, see the - {{jsxref("Global_Objects/Intl", "Intl", "#locale_identification_and_negotiation", 1)}} page. - - `style` - - - : The formatting style to use, the default is `"long"`. - - - `"narrow"` - - `"short"` - - `"long"` - + - : An object containing the following properties, in the order they are retrieved: + - `localeMatcher` {{optional_inline}} + - : The locale matching algorithm to use. Possible values are `"lookup"` and `"best fit"`; the default is `"best fit"`. For information about this option, see [Locale identification and negotiation](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation). + - `style` {{optional_inline}} + - : The formatting style to use. Possible values are `"narrow"`, `"short"`, and `"long"`; the default is `"long"`. - `type` - - - : The type to use. - - - `"calendar"` - - `"currency"` - - `"dateTimeField"` - - `"language"` - - `"region"` - - `"script"` - - - `languageDisplay` - - - : The `languageDisplay` it's only usable along with type `language`, defaults to `dialect`. - - `"dialect"` + - : The type of display names to return from [`of()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of). Possible values are `"language"`, `"region"`, `"script"`, `"currency"`, `"calendar"`, and `"dateTimeField"`. + - `fallback` {{optional_inline}} + - : What to return from `of()` if the input is structurally valid but there's no matching display name. Possible values are: + - `"code"` (default) + - : Return the input code itself. + - `"none"` + - : Return `undefined`. + - `languageDisplay` {{optional_inline}} + - : How language names should be displayed. Only usable along with `type: "language"`. Possible values are: + - `"dialect"` (default) + - : Display special regional dialects using their own name. E.g. `"nl-BE"` will be displayed as `"Flemish"`. - `"standard"` + - : Display all languages using standard format. E.g. `"nl-BE"` will be displayed as `"Dutch (Belgium)"`. - - `fallback` - - - : The fallback to use, the default is `"code"`. +### Exceptions - - `"code"` - - `"none"` +- {{jsxref("TypeError")}} + - : Thrown if `options.type` is not provided. +- {{jsxref("RangeError")}} + - : Thrown if `locales` or `options` contain invalid values. ## Examples diff --git a/files/en-us/web/javascript/reference/global_objects/intl/durationformat/durationformat/index.md b/files/en-us/web/javascript/reference/global_objects/intl/durationformat/durationformat/index.md index 6f3d1cab227ed3e..9b4b58d65ebff6e 100644 --- a/files/en-us/web/javascript/reference/global_objects/intl/durationformat/durationformat/index.md +++ b/files/en-us/web/javascript/reference/global_objects/intl/durationformat/durationformat/index.md @@ -114,7 +114,7 @@ new Intl.DurationFormat(locales, options) ### Exceptions - {{jsxref("RangeError")}} - - : If `locales` or `options` contain invalid values. + - : Thrown if `locales` or `options` contain invalid values. ## Description diff --git a/files/en-us/web/javascript/reference/global_objects/intl/listformat/listformat/index.md b/files/en-us/web/javascript/reference/global_objects/intl/listformat/listformat/index.md index d73b42510dca5f1..caa73655a49bbe1 100644 --- a/files/en-us/web/javascript/reference/global_objects/intl/listformat/listformat/index.md +++ b/files/en-us/web/javascript/reference/global_objects/intl/listformat/listformat/index.md @@ -24,32 +24,32 @@ new Intl.ListFormat(locales, options) ### Parameters - `locales` {{optional_inline}} - - : A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the `locales` argument, see [the parameter description on the `Intl` main page](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + - : A string with a BCP 47 language tag or an {{jsxref("Intl.Locale")}} instance, or an array of such locale identifiers. For the general form and interpretation of the `locales` argument, see [the parameter description on the `Intl` main page](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). - `options` {{optional_inline}} - - - : An object with some or all of the following properties: - + - : An object containing the following properties, in the order they are retrieved (all of them are optional): - `localeMatcher` - - - : The locale-matching algorithm to use. Possible values: - - - `"best fit"` (default) - - `"lookup"` - - For information about this option, see the - {{jsxref("Global_Objects/Intl", "Intl", "#locale_identification_and_negotiation", 1)}} - page. - + - : The locale matching algorithm to use. Possible values are `"lookup"` and `"best fit"`; the default is `"best fit"`. For information about this option, see [Locale identification and negotiation](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation). - `type` - - : Indicates the type of grouping. Possible values: - - `"conjunction"`, for "and"-based grouping of the list items: "A, B, and C" (default) - - `"disjunction"`, for "or"-based grouping of the list items: "A, B, or C" - - `"unit"`, for grouping the list items as a unit (neither "and"-based nor "or"-based): "A, B, C" + - : Indicates the type of grouping. Possible values are: + - `"conjunction"` (default) + - : For "and"-based grouping of the list items: "A, B, and C" + - `"disjunction"` + - : For "or"-based grouping of the list items: "A, B, or C" + - `"unit"` + - : For grouping the list items as a unit (neither "and"-based nor "or"-based): "A, B, C" - `style` - - : Indicates the grouping style (for example, whether list separators and conjunctions are included). Possible values: - - `"long"`: "A, B, and C" (default) - - `"short"`: "A, B, C" - - `"narrow"`: "A B C" + - : The grouping style (for example, whether list separators and conjunctions are included). Possible values are: + - `"long"` (default) + - : E.g. "A, B, and C" + - `"short"` + - : E.g. "A, B, C" + - `"narrow"` + - : E.g. "A B C" + +### Exceptions + +- {{jsxref("RangeError")}} + - : Thrown if `locales` or `options` contain invalid values. ## Examples diff --git a/files/en-us/web/javascript/reference/global_objects/intl/relativetimeformat/relativetimeformat/index.md b/files/en-us/web/javascript/reference/global_objects/intl/relativetimeformat/relativetimeformat/index.md index c8e2aade3bead57..e42e1ba912cb92b 100644 --- a/files/en-us/web/javascript/reference/global_objects/intl/relativetimeformat/relativetimeformat/index.md +++ b/files/en-us/web/javascript/reference/global_objects/intl/relativetimeformat/relativetimeformat/index.md @@ -54,7 +54,7 @@ new Intl.RelativeTimeFormat(locales, options) ### Exceptions - {{jsxref("RangeError")}} - - : If `locales` or `options` contain invalid values. + - : Thrown if `locales` or `options` contain invalid values. ## Examples diff --git a/files/en-us/web/javascript/reference/global_objects/intl/segmenter/segmenter/index.md b/files/en-us/web/javascript/reference/global_objects/intl/segmenter/segmenter/index.md index 2b328cb91b57cb9..409ae7378ccee14 100644 --- a/files/en-us/web/javascript/reference/global_objects/intl/segmenter/segmenter/index.md +++ b/files/en-us/web/javascript/reference/global_objects/intl/segmenter/segmenter/index.md @@ -24,28 +24,29 @@ new Intl.Segmenter(locales, options) ### Parameters - `locales` {{optional_inline}} - - : A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the `locales` argument, see [the parameter description on the `Intl` main page](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + - : A string with a BCP 47 language tag or an {{jsxref("Intl.Locale")}} instance, or an array of such locale identifiers. For the general form and interpretation of the `locales` argument, see [the parameter description on the `Intl` main page](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). - `options` {{optional_inline}} - - : An object with some or all of the following properties: - - `granularity` {{optional_inline}} - - : A string. Possible values are: + - : An object containing the following properties, in the order they are retrieved (all of them are optional): + - `localeMatcher` + - : The locale matching algorithm to use. Possible values are `"lookup"` and `"best fit"`; the default is `"best fit"`. For information about this option, see [Locale identification and negotiation](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation). + - `granularity` + - : How granularly should the input be split. Possible values are: - `"grapheme"` (default) - : Split the input into segments at grapheme cluster (user-perceived character) boundaries, as determined by the locale. - `"word"` - : Split the input into segments at word boundaries, as determined by the locale. - `"sentence"` - : Split the input into segments at sentence boundaries, as determined by the locale. - - `localeMatcher` {{optional_inline}} - - : The locale matching algorithm to use. Possible values are: - - `"best fit"` (default) - - : The runtime may choose a possibly more suited locale than the result of the lookup algorithm. - - `"lookup"` - - : Use the [BCP 47 Lookup algorithm](https://datatracker.ietf.org/doc/html/rfc4647#section-3.4) to choose the locale from `locales`. For each locale in `locales`, the runtime returns the first supported locale (possibly removing restricting subtags of the provided locale tag to find such a supported locale. In other words providing `"de-CH"` as `locales` may result in using `"de"` if `"de"` is supported but `"de-CH"` is not). ### Return value A new [`Intl.Segmenter`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) instance. +### Exceptions + +- {{jsxref("RangeError")}} + - : Thrown if `locales` or `options` contain invalid values. + ## Examples ### Basic usage From 978457393f4ea7cb9029c9624af5e1d6f63ed41d Mon Sep 17 00:00:00 2001 From: Onkar Ruikar <87750369+OnkarRuikar@users.noreply.github.com> Date: Tue, 5 Sep 2023 11:01:43 +0530 Subject: [PATCH 05/94] fix(css): `:blank` and `@page:blank` are not same (#28896) --- files/en-us/web/css/@page/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/css/@page/index.md b/files/en-us/web/css/@page/index.md index 01ea6cfc3121d37..6ee8d2b72cfd6e0 100644 --- a/files/en-us/web/css/@page/index.md +++ b/files/en-us/web/css/@page/index.md @@ -153,7 +153,7 @@ Where the `` includes: and `` represents these pseudo-classes: -- {{Cssxref(":blank")}} +- [`:blank`](https://drafts.csswg.org/css-page/#blank-pseudo) - {{Cssxref(":first")}} - {{Cssxref(":left")}} - {{Cssxref(":right")}} @@ -389,7 +389,7 @@ Clicking the print button will launch a print dialog with the html sections spli Please refer to the various [pseudo-classes](/en-US/docs/Web/CSS/Pseudo-classes) of `@page` for examples. -- {{Cssxref(":blank")}} +- [`:blank`](https://drafts.csswg.org/css-page/#blank-pseudo) - {{Cssxref(":first")}} - {{Cssxref(":left")}} - {{Cssxref(":right")}} From 27c5383cd85224527db828234ba454cb07aeca0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Fro=C5=82ow?= Date: Tue, 5 Sep 2023 08:28:25 +0200 Subject: [PATCH 06/94] performance.now() not Performance.now() (#28932) * performance.now() not Performance.now() * lower case only code * so when it is referred as method should be lower-case * one more --- .../web/api/performance_api/high_precision_timing/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/performance_api/high_precision_timing/index.md b/files/en-us/web/api/performance_api/high_precision_timing/index.md index 903446f5e27d458..dc5a7cfcce61a55 100644 --- a/files/en-us/web/api/performance_api/high_precision_timing/index.md +++ b/files/en-us/web/api/performance_api/high_precision_timing/index.md @@ -26,7 +26,7 @@ The `performance.now()` method (and all other `DOMHighResTimeStamp` values) prov ```js Date.now(); // 1678889977578 -Performance.now(); // 233936 +performance.now(); // 233936 ``` For measuring performance, calculating precise frame rates (FPS), animation loops, etc., use monotonically increasing high resolution time available with {{domxref("Performance.now()")}} instead of JavaScript's {{jsxref("Date.now()")}}. From 513e8a2a3945106fbe3b1e99d041e891449f1c3d Mon Sep 17 00:00:00 2001 From: Weijian Duan <35257543+GymRat102@users.noreply.github.com> Date: Tue, 5 Sep 2023 14:28:46 +0800 Subject: [PATCH 07/94] Fix confusing content (#28938) I think we intend to use `console.error()` here, inferred from above code and below paragraph. Even though using `console.log()` I can still get the point of handling by print to console, but it might be misleading to other people. Also, could add the difference of `console.log()` and `console.error()` here, but I want to propose this simple change for review. --- .../javascript/client-side_web_apis/fetching_data/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/learn/javascript/client-side_web_apis/fetching_data/index.md b/files/en-us/learn/javascript/client-side_web_apis/fetching_data/index.md index e30d9cbf9f8986f..0c230efdb0bffe6 100644 --- a/files/en-us/learn/javascript/client-side_web_apis/fetching_data/index.md +++ b/files/en-us/learn/javascript/client-side_web_apis/fetching_data/index.md @@ -190,7 +190,7 @@ Inside this function we: Next we pass a function into the `then()` method of that returned promise. This function will be passed an object containing the response data as JSON, which we pass into the `initialize()` function. This function which starts the process of displaying all the products in the user interface. -To handle errors, we chain a `.catch()` block onto the end of the chain. This runs if the promise fails for some reason. Inside it, we include a function that is passed as a parameter, an `err` object. This `err` object can be used to report the nature of the error that has occurred, in this case we do it with a simple `console.log()`. +To handle errors, we chain a `.catch()` block onto the end of the chain. This runs if the promise fails for some reason. Inside it, we include a function that is passed as a parameter, an `err` object. This `err` object can be used to report the nature of the error that has occurred, in this case we do it with a simple `console.error()`. However, a complete website would handle this error more gracefully by displaying a message on the user's screen and perhaps offering options to remedy the situation, but we don't need anything more than a simple `console.error()`. From cf80b85f0b6d194728abb96df33b3b652229ac8c Mon Sep 17 00:00:00 2001 From: yarusome <97945148+yarusome@users.noreply.github.com> Date: Tue, 5 Sep 2023 14:45:58 +0800 Subject: [PATCH 08/94] Fix link to `AbortController()` (#28941) --- files/en-us/web/api/abortcontroller/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/abortcontroller/index.md b/files/en-us/web/api/abortcontroller/index.md index 2030901133a84cf..e82fe97efed6438 100644 --- a/files/en-us/web/api/abortcontroller/index.md +++ b/files/en-us/web/api/abortcontroller/index.md @@ -13,7 +13,7 @@ You can create a new `AbortController` object using the {{domxref("AbortControll ## Constructor -- {{domxref("AbortController()")}} +- {{domxref("AbortController.AbortController()", "AbortController()")}} - : Creates a new `AbortController` object instance. ## Instance properties From 9870f3421fa9bca14cfd716413125bfc815b5af4 Mon Sep 17 00:00:00 2001 From: Chaitanya J <56331036+7777chaitanya@users.noreply.github.com> Date: Tue, 5 Sep 2023 12:18:18 +0530 Subject: [PATCH 09/94] Fix variable name in comment (#28939) --- .../web/javascript/reference/statements/try...catch/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/javascript/reference/statements/try...catch/index.md b/files/en-us/web/javascript/reference/statements/try...catch/index.md index e7f77691ea5c708..0e22949e161057c 100644 --- a/files/en-us/web/javascript/reference/statements/try...catch/index.md +++ b/files/en-us/web/javascript/reference/statements/try...catch/index.md @@ -77,7 +77,7 @@ try { throw new TypeError("oops"); } catch ({ name, message }) { var name; // SyntaxError: Identifier 'name' has already been declared - let message; // SyntaxError: Identifier 'name' has already been declared + let message; // SyntaxError: Identifier 'message' has already been declared } ``` From 0ac6d5c46cc6f9c074c1d74afe478c3a28d070d6 Mon Sep 17 00:00:00 2001 From: Geovane Schmitz Date: Tue, 5 Sep 2023 04:07:19 -0300 Subject: [PATCH 10/94] Fix incorrect closing tag in example html (#28934) - Fixing a typo where the intended ul tag was closed but the div tag was closed --- .../web/accessibility/aria/roles/alertdialog_role/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/accessibility/aria/roles/alertdialog_role/index.md b/files/en-us/web/accessibility/aria/roles/alertdialog_role/index.md index ccecfa6eb6eaf61..c964fe2fd5a3482 100644 --- a/files/en-us/web/accessibility/aria/roles/alertdialog_role/index.md +++ b/files/en-us/web/accessibility/aria/roles/alertdialog_role/index.md @@ -67,7 +67,7 @@ The code snippet above shows how to mark up an alert dialog that only provides a
  • - + ``` From 880e0d7edf6b7effe44b08c4ff0f697a3e5a929a Mon Sep 17 00:00:00 2001 From: wbamberg Date: Tue, 5 Sep 2023 00:08:49 -0700 Subject: [PATCH 11/94] Fix issue 28899: launch_handler example syntax (#28935) --- files/en-us/web/manifest/launch_handler/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/manifest/launch_handler/index.md b/files/en-us/web/manifest/launch_handler/index.md index 9bec3ab0663ebb4..2c3392bd4774865 100644 --- a/files/en-us/web/manifest/launch_handler/index.md +++ b/files/en-us/web/manifest/launch_handler/index.md @@ -58,7 +58,7 @@ The `launch_handler` member defines values that control the launch of a web appl } "launch_handler": { - "client_mode": ["focus-existing, auto"] + "client_mode": ["focus-existing", "auto"] } ``` From 6e18c5c493b2fc7d3b07f420d04f3aebcca1b0e8 Mon Sep 17 00:00:00 2001 From: Brian Thomas Smith Date: Tue, 5 Sep 2023 10:37:13 +0200 Subject: [PATCH 12/94] relnote(118): CSS math functions enabled (CSS Values 4) (#28925) * relnote(118): CSS math functions enabled (CSS Values 4) * relnote(118): CSS math functions enabled (CSS Values 4) * relnote(118): CSS math functions, move 112 release note to 118 * relnote(118): CSS math functions enabled (CSS Values 4) --- .../firefox/experimental_features/index.md | 84 ------------------- .../mozilla/firefox/releases/112/index.md | 2 - .../mozilla/firefox/releases/118/index.md | 2 + files/en-us/web/css/css_functions/index.md | 6 +- 4 files changed, 5 insertions(+), 89 deletions(-) diff --git a/files/en-us/mozilla/firefox/experimental_features/index.md b/files/en-us/mozilla/firefox/experimental_features/index.md index b2bb544c95f9cc3..a6e8089c7979045 100644 --- a/files/en-us/mozilla/firefox/experimental_features/index.md +++ b/files/en-us/mozilla/firefox/experimental_features/index.md @@ -605,47 +605,6 @@ See [Firefox bug 1715546](https://bugzil.la/1715546) for more details. -### round() math function - -The CSS [`round()`](/en-US/docs/Web/CSS/round) function is a math function that rounds a number (or the result of an expression) based on a selected rounding strategy. -See [Firefox bug 1764850](https://bugzil.la/1764850) for more details. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Release channelVersion addedEnabled by default?
    Nightly108Yes
    Developer Edition108No
    Beta108No
    Release108No
    Preference namelayout.css.round.enabled
    - ### font-variant-emoji The CSS [`font-variant-emoji`](/en-US/docs/Web/CSS/font-variant-emoji) property allows you to set a default presentation style for displaying emojis. @@ -934,49 +893,6 @@ The CSS {{cssxref("offset-position")}} property defines the initial position of -### abs() and sign() math functions - -The CSS [`abs()`](/en-US/docs/Web/CSS/abs) and [`sign()`](/en-US/docs/Web/CSS/sign) math functions allow you to get the absolute value and the sign of an argument, respectively. -See [Firefox bug 1814588](https://bugzil.la/1814588) and [Firefox bug 1814589](https://bugzil.la/1814589) for more details. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Release channelVersion addedEnabled by default?
    Nightly117Yes
    Developer Edition117No
    Beta117No
    Release117No
    Preference name - layout.css.abs-sign.enabled -
    - ### rect() and xywh() basic shape functions The CSS [`rect()`](/en-US/docs/Web/CSS/basic-shape/rect) and [`xywh()`](/en-US/docs/Web/CSS/basic-shape/xywh) shape functions enable you to define a rectangle using the [``](/en-US/docs/Web/CSS/basic-shape) data type. In CSS properties such as {{cssxref("offset-path")}}, these functions are used to define the shape of the path along which an element moves. Using the `rect()` function, you specify the rectangle edge offsets from the top edge and left edges of the containing block. Using the `xywh()` function, you specify the rectangle edge offsets from the left and top edges of the containing block as well as the width and height of the rectangle. In both the functions, you can optionally round off the corners. diff --git a/files/en-us/mozilla/firefox/releases/112/index.md b/files/en-us/mozilla/firefox/releases/112/index.md index 4833ace16e565b1..9ee1cb3feb3cb29 100644 --- a/files/en-us/mozilla/firefox/releases/112/index.md +++ b/files/en-us/mozilla/firefox/releases/112/index.md @@ -16,8 +16,6 @@ This article provides information about the changes in Firefox 112 that affect d ### CSS -- [Exponential functions](/en-US/docs/Web/CSS/CSS_Functions#exponential_functions) are now enabled by default. - This allows the use of `pow()`, `sqrt()`, `hypot()`, `log()` and `exp()` functions ([Firefox bug 1814469](https://bugzil.la/1814469)). - The `overlay` keyword value for the {{cssxref("overflow")}} property is now supported as a legacy alias of the keyword value `auto` ([Firefox bug 1817189](https://bugzil.la/1817189)). - The `linear()` [easing function](/en-US/docs/Web/CSS/easing-function) is now supported. This defines easing functions that interpolate linearly between a set of points and is useful for approximating complex animations ([Firefox bug 1819447](https://bugzil.la/1819447), [Firefox bug 1764126](https://bugzil.la/1764126)). diff --git a/files/en-us/mozilla/firefox/releases/118/index.md b/files/en-us/mozilla/firefox/releases/118/index.md index 46b9c02be47b30d..30162eec8e0daf7 100644 --- a/files/en-us/mozilla/firefox/releases/118/index.md +++ b/files/en-us/mozilla/firefox/releases/118/index.md @@ -18,6 +18,8 @@ This article provides information about the changes in Firefox 118 that affect d ### CSS +- Multiple CSS [math functions](/en-US/docs/Web/CSS/CSS_Functions#math_functions) are now supported: [`abs()`](/en-US/docs/Web/CSS/abs), [`sign()`](/en-US/docs/Web/CSS/sign), [`round()`](/en-US/docs/Web/CSS/round), [`mod()`](/en-US/docs/Web/CSS/mod), [`rem()`](/en-US/docs/Web/CSS/rem), [`pow()`](/en-US/docs/Web/CSS/pow), [`sqrt()`](/en-US/docs/Web/CSS/sqrt), [`hypot()`](/en-US/docs/Web/CSS/hypot), [`log()`](/en-US/docs/Web/CSS/log), and [`exp()`](/en-US/docs/Web/CSS/exp) (Firefox bug [1814589](https://bugzil.la/1814589)). + #### Removals ### JavaScript diff --git a/files/en-us/web/css/css_functions/index.md b/files/en-us/web/css/css_functions/index.md index 735dc0762a4ed34..25c4f73b7d2ad13 100644 --- a/files/en-us/web/css/css_functions/index.md +++ b/files/en-us/web/css/css_functions/index.md @@ -106,11 +106,11 @@ The math functions allow CSS numeric values to be written as mathematical expres ### Stepped value functions -- {{CSSxRef("round", "round()")}} {{Experimental_Inline}} +- {{CSSxRef("round", "round()")}} - : Calculates a rounded number based on a rounding strategy. -- {{CSSxRef("mod", "mod()")}} {{Experimental_Inline}} +- {{CSSxRef("mod", "mod()")}} - : Calculates a modulus (with the same sign as the divisor) when dividing one number by another. -- {{CSSxRef("rem", "rem()")}} {{Experimental_Inline}} +- {{CSSxRef("rem", "rem()")}} - : Calculates a remainder (with the same sign as the dividend) when dividing one number by another. ### Trigonometric functions From 37cafbf841e592957405d386de56a72cfe44b043 Mon Sep 17 00:00:00 2001 From: Chris Mills Date: Tue, 5 Sep 2023 14:14:35 +0100 Subject: [PATCH 13/94] Improve notes about async versions of filesystemsyncaccesshandle methods (#28814) * Improve notes about async versions of filesystemsyncaccesshandle methods * move notes to better places --- files/en-us/web/api/filesystemfilehandle/index.md | 2 +- files/en-us/web/api/filesystemsyncaccesshandle/close/index.md | 4 ++-- files/en-us/web/api/filesystemsyncaccesshandle/flush/index.md | 4 ++-- .../en-us/web/api/filesystemsyncaccesshandle/getsize/index.md | 4 ++-- files/en-us/web/api/filesystemsyncaccesshandle/index.md | 4 ++-- files/en-us/web/api/filesystemsyncaccesshandle/read/index.md | 2 +- .../web/api/filesystemsyncaccesshandle/truncate/index.md | 4 ++-- files/en-us/web/api/filesystemsyncaccesshandle/write/index.md | 2 +- files/en-us/web/api/storagemanager/getdirectory/index.md | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/files/en-us/web/api/filesystemfilehandle/index.md b/files/en-us/web/api/filesystemfilehandle/index.md index 4b86c3253ea6a58..2db866e34c06081 100644 --- a/files/en-us/web/api/filesystemfilehandle/index.md +++ b/files/en-us/web/api/filesystemfilehandle/index.md @@ -118,7 +118,7 @@ onmessage = async (e) => { }; ``` -> **Note:** In earlier versions of the spec, {{domxref("FileSystemSyncAccessHandle.close()", "close()")}}, {{domxref("FileSystemSyncAccessHandle.flush()", "flush()")}}, {{domxref("FileSystemSyncAccessHandle.getSize()", "getSize()")}}, and {{domxref("FileSystemSyncAccessHandle.truncate()", "truncate()")}} were wrongly specified as asynchronous methods. This has now been [amended](https://github.com/whatwg/fs/issues/7), but some browsers still support the asynchronous versions. +> **Note:** In earlier versions of the spec, {{domxref("FileSystemSyncAccessHandle.close()", "close()")}}, {{domxref("FileSystemSyncAccessHandle.flush()", "flush()")}}, {{domxref("FileSystemSyncAccessHandle.getSize()", "getSize()")}}, and {{domxref("FileSystemSyncAccessHandle.truncate()", "truncate()")}} were wrongly specified as asynchronous methods, and older versions of some browsers implement them in this way. However, all current browsers that support these methods implement them as synchronous methods. ## Specifications diff --git a/files/en-us/web/api/filesystemsyncaccesshandle/close/index.md b/files/en-us/web/api/filesystemsyncaccesshandle/close/index.md index ae38c662768b1ed..35265e737c0c5d4 100644 --- a/files/en-us/web/api/filesystemsyncaccesshandle/close/index.md +++ b/files/en-us/web/api/filesystemsyncaccesshandle/close/index.md @@ -11,6 +11,8 @@ browser-compat: api.FileSystemSyncAccessHandle.close The **`close()`** method of the {{domxref("FileSystemSyncAccessHandle")}} interface closes an open synchronous file handle, disabling any further operations on it and releasing the exclusive lock previously put on the file associated with the file handle. +> **Note:** In earlier versions of the spec, `close()`, {{domxref("FileSystemSyncAccessHandle.flush()", "flush()")}}, {{domxref("FileSystemSyncAccessHandle.getSize()", "getSize()")}}, and {{domxref("FileSystemSyncAccessHandle.truncate()", "truncate()")}} were wrongly specified as asynchronous methods, and older versions of some browsers implement them in this way. However, all current browsers that support these methods implement them as synchronous methods. + ## Syntax ```js-nolint @@ -69,8 +71,6 @@ onmessage = async (e) => { }; ``` -> **Note:** In earlier versions of the spec, `close()`, {{domxref("FileSystemSyncAccessHandle.flush()", "flush()")}}, {{domxref("FileSystemSyncAccessHandle.getSize()", "getSize()")}}, and {{domxref("FileSystemSyncAccessHandle.truncate()", "truncate()")}} were wrongly specified as asynchronous methods. This has now been [amended](https://github.com/whatwg/fs/issues/7), but some browsers still support the asynchronous versions. - ## Specifications {{Specifications}} diff --git a/files/en-us/web/api/filesystemsyncaccesshandle/flush/index.md b/files/en-us/web/api/filesystemsyncaccesshandle/flush/index.md index e0858782a54ad66..33936443792bf3b 100644 --- a/files/en-us/web/api/filesystemsyncaccesshandle/flush/index.md +++ b/files/en-us/web/api/filesystemsyncaccesshandle/flush/index.md @@ -13,6 +13,8 @@ The **`flush()`** method of the Bear in mind that you only need to call this method if you need the changes committed to disk at a specific time, otherwise you can leave the underlying operating system to handle this when it sees fit, which should be OK in most cases. +> **Note:** In earlier versions of the spec, {{domxref("FileSystemSyncAccessHandle.close()", "close()")}}, `flush()`, {{domxref("FileSystemSyncAccessHandle.getSize()", "getSize()")}}, and {{domxref("FileSystemSyncAccessHandle.truncate()", "truncate()")}} were wrongly specified as asynchronous methods, and older versions of some browsers implement them in this way. However, all current browsers that support these methods implement them as synchronous methods. + ## Syntax ```js-nolint @@ -71,8 +73,6 @@ onmessage = async (e) => { }; ``` -> **Note:** In earlier versions of the spec, {{domxref("FileSystemSyncAccessHandle.close()", "close()")}}, `flush()`, {{domxref("FileSystemSyncAccessHandle.getSize()", "getSize()")}}, and {{domxref("FileSystemSyncAccessHandle.truncate()", "truncate()")}} were wrongly specified as asynchronous methods. This has now been [amended](https://github.com/whatwg/fs/issues/7), but some browsers still support the asynchronous versions. - ## Specifications {{Specifications}} diff --git a/files/en-us/web/api/filesystemsyncaccesshandle/getsize/index.md b/files/en-us/web/api/filesystemsyncaccesshandle/getsize/index.md index 90c76eb8f6a39a2..5c6df6cd1d46e22 100644 --- a/files/en-us/web/api/filesystemsyncaccesshandle/getsize/index.md +++ b/files/en-us/web/api/filesystemsyncaccesshandle/getsize/index.md @@ -11,6 +11,8 @@ browser-compat: api.FileSystemSyncAccessHandle.getSize The **`getSize()`** method of the {{domxref("FileSystemSyncAccessHandle")}} interface returns the size of the file associated with the handle in bytes. +> **Note:** In earlier versions of the spec, {{domxref("FileSystemSyncAccessHandle.close()", "close()")}}, {{domxref("FileSystemSyncAccessHandle.flush()", "flush()")}}, `getSize()`, and {{domxref("FileSystemSyncAccessHandle.truncate()", "truncate()")}} were wrongly specified as asynchronous methods, and older versions of some browsers implement them in this way. However, all current browsers that support these methods implement them as synchronous methods. + ## Syntax ```js-nolint @@ -70,8 +72,6 @@ onmessage = async (e) => { }; ``` -> **Note:** In earlier versions of the spec, {{domxref("FileSystemSyncAccessHandle.close()", "close()")}}, {{domxref("FileSystemSyncAccessHandle.flush()", "flush()")}}, `getSize()`, and {{domxref("FileSystemSyncAccessHandle.truncate()", "truncate()")}} were wrongly specified as asynchronous methods. This has now been [amended](https://github.com/whatwg/fs/issues/7), but some browsers still support the asynchronous versions. - ## Specifications {{Specifications}} diff --git a/files/en-us/web/api/filesystemsyncaccesshandle/index.md b/files/en-us/web/api/filesystemsyncaccesshandle/index.md index 0303b85b4faf609..aa1e458e0569619 100644 --- a/files/en-us/web/api/filesystemsyncaccesshandle/index.md +++ b/files/en-us/web/api/filesystemsyncaccesshandle/index.md @@ -17,6 +17,8 @@ The interface is accessed through the {{domxref('FileSystemFileHandle.createSync {{InheritanceDiagram}} +> **Note:** In earlier versions of the spec, {{domxref("FileSystemSyncAccessHandle.close()", "close()")}}, {{domxref("FileSystemSyncAccessHandle.flush()", "flush()")}}, {{domxref("FileSystemSyncAccessHandle.getSize()", "getSize()")}}, and {{domxref("FileSystemSyncAccessHandle.truncate()", "truncate()")}} were wrongly specified as asynchronous methods, and older versions of some browsers implement them in this way. However, all current browsers that support these methods implement them as synchronous methods. + ## Instance properties None. @@ -76,8 +78,6 @@ onmessage = async (e) => { }; ``` -> **Note:** In earlier versions of the spec, {{domxref("FileSystemSyncAccessHandle.close()", "close()")}}, {{domxref("FileSystemSyncAccessHandle.flush()", "flush()")}}, {{domxref("FileSystemSyncAccessHandle.getSize()", "getSize()")}}, and {{domxref("FileSystemSyncAccessHandle.truncate()", "truncate()")}} were wrongly specified as asynchronous methods. This has now been [amended](https://github.com/whatwg/fs/issues/7), but some browsers still support the asynchronous versions. - ## Specifications {{Specifications}} diff --git a/files/en-us/web/api/filesystemsyncaccesshandle/read/index.md b/files/en-us/web/api/filesystemsyncaccesshandle/read/index.md index e9e58470c02a0cd..46fc9c9c5df021c 100644 --- a/files/en-us/web/api/filesystemsyncaccesshandle/read/index.md +++ b/files/en-us/web/api/filesystemsyncaccesshandle/read/index.md @@ -77,7 +77,7 @@ onmessage = async (e) => { }; ``` -> **Note:** In earlier versions of the spec, {{domxref("FileSystemSyncAccessHandle.close()", "close()")}}, {{domxref("FileSystemSyncAccessHandle.flush()", "flush()")}}, {{domxref("FileSystemSyncAccessHandle.getSize()", "getSize()")}}, and {{domxref("FileSystemSyncAccessHandle.truncate()", "truncate()")}} were wrongly specified as asynchronous methods. This has now been [amended](https://github.com/whatwg/fs/issues/7), but some browsers still support the asynchronous versions. +> **Note:** In earlier versions of the spec, {{domxref("FileSystemSyncAccessHandle.close()", "close()")}}, {{domxref("FileSystemSyncAccessHandle.flush()", "flush()")}}, {{domxref("FileSystemSyncAccessHandle.getSize()", "getSize()")}}, and {{domxref("FileSystemSyncAccessHandle.truncate()", "truncate()")}} were wrongly specified as asynchronous methods, and older versions of some browsers implement them in this way. However, all current browsers that support these methods implement them as synchronous methods. ## Specifications diff --git a/files/en-us/web/api/filesystemsyncaccesshandle/truncate/index.md b/files/en-us/web/api/filesystemsyncaccesshandle/truncate/index.md index 90175304098db7f..abb24b48f55cbf5 100644 --- a/files/en-us/web/api/filesystemsyncaccesshandle/truncate/index.md +++ b/files/en-us/web/api/filesystemsyncaccesshandle/truncate/index.md @@ -11,6 +11,8 @@ browser-compat: api.FileSystemSyncAccessHandle.truncate The **`truncate()`** method of the {{domxref("FileSystemSyncAccessHandle")}} interface resizes the file associated with the handle to a specified number of bytes. +> **Note:** In earlier versions of the spec, {{domxref("FileSystemSyncAccessHandle.close()", "close()")}}, {{domxref("FileSystemSyncAccessHandle.flush()", "flush()")}}, {{domxref("FileSystemSyncAccessHandle.getSize()", "getSize()")}}, and `truncate()` were wrongly specified as asynchronous methods, and older versions of some browsers implement them in this way. However, all current browsers that support these methods implement them as synchronous methods. + ## Syntax ```js-nolint @@ -54,8 +56,6 @@ async function truncateFile() { } ``` -> **Note:** In earlier versions of the spec, {{domxref("FileSystemSyncAccessHandle.close()", "close()")}}, {{domxref("FileSystemSyncAccessHandle.flush()", "flush()")}}, {{domxref("FileSystemSyncAccessHandle.getSize()", "getSize()")}}, and `truncate()` were wrongly specified as asynchronous methods. This has now been [amended](https://github.com/whatwg/fs/issues/7), but some browsers still support the asynchronous versions. - ## Specifications {{Specifications}} diff --git a/files/en-us/web/api/filesystemsyncaccesshandle/write/index.md b/files/en-us/web/api/filesystemsyncaccesshandle/write/index.md index 29745575b9f366f..9f057de938600a7 100644 --- a/files/en-us/web/api/filesystemsyncaccesshandle/write/index.md +++ b/files/en-us/web/api/filesystemsyncaccesshandle/write/index.md @@ -79,7 +79,7 @@ onmessage = async (e) => { }; ``` -> **Note:** In earlier versions of the spec, {{domxref("FileSystemSyncAccessHandle.close()", "close()")}}, {{domxref("FileSystemSyncAccessHandle.flush()", "flush()")}}, {{domxref("FileSystemSyncAccessHandle.getSize()", "getSize()")}}, and {{domxref("FileSystemSyncAccessHandle.truncate()", "truncate()")}} were wrongly specified as asynchronous methods. This has now been [amended](https://github.com/whatwg/fs/issues/7), but some browsers still support the asynchronous versions. +> **Note:** In earlier versions of the spec, {{domxref("FileSystemSyncAccessHandle.close()", "close()")}}, {{domxref("FileSystemSyncAccessHandle.flush()", "flush()")}}, {{domxref("FileSystemSyncAccessHandle.getSize()", "getSize()")}}, and {{domxref("FileSystemSyncAccessHandle.truncate()", "truncate()")}} were wrongly specified as asynchronous methods, and older versions of some browsers implement them in this way. However, all current browsers that support these methods implement them as synchronous methods. ## Specifications diff --git a/files/en-us/web/api/storagemanager/getdirectory/index.md b/files/en-us/web/api/storagemanager/getdirectory/index.md index 70ab945aec6dbeb..39ba786b4ab2fd9 100644 --- a/files/en-us/web/api/storagemanager/getdirectory/index.md +++ b/files/en-us/web/api/storagemanager/getdirectory/index.md @@ -70,7 +70,7 @@ onmessage = async (e) => { }; ``` -> **Note:** In earlier versions of the spec, {{domxref("FileSystemSyncAccessHandle.close()", "close()")}}, {{domxref("FileSystemSyncAccessHandle.flush()", "flush()")}}, {{domxref("FileSystemSyncAccessHandle.getSize()", "getSize()")}}, and {{domxref("FileSystemSyncAccessHandle.truncate()", "truncate()")}} were wrongly specified as asynchronous methods. This has now been [amended](https://github.com/whatwg/fs/issues/7), but some browsers still support the asynchronous versions. +> **Note:** In earlier versions of the spec, {{domxref("FileSystemSyncAccessHandle.close()", "close()")}}, {{domxref("FileSystemSyncAccessHandle.flush()", "flush()")}}, {{domxref("FileSystemSyncAccessHandle.getSize()", "getSize()")}}, and {{domxref("FileSystemSyncAccessHandle.truncate()", "truncate()")}} were wrongly specified as asynchronous methods, and older versions of some browsers implement them in this way. However, all current browsers that support these methods implement them as synchronous methods. ## Specifications From 85fe4545609d61b5525870d4adaa08327017acec Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Tue, 5 Sep 2023 16:35:23 +0200 Subject: [PATCH 14/94] Remove non-exisiting performance api articles (#28946) --- files/en-us/web/api/performance_api/index.md | 34 -------------------- 1 file changed, 34 deletions(-) diff --git a/files/en-us/web/api/performance_api/index.md b/files/en-us/web/api/performance_api/index.md index 933da2692142eda..7c7938e4f398866 100644 --- a/files/en-us/web/api/performance_api/index.md +++ b/files/en-us/web/api/performance_api/index.md @@ -90,40 +90,6 @@ The following guides help you to understand key concepts of the Performance API - [Navigation timing](/en-US/docs/Web/API/Performance_API/Navigation_timing): Measuring navigation timing of a document. - [User timing](/en-US/docs/Web/API/Performance_API/User_timing): Measuring and recording performance data custom to your application. - [Server timing](/en-US/docs/Web/API/Performance_API/Server_timing): Collecting server-side metrics. -- Paint timing -- Long task timing -- Largest contentful paint -- Event timing -- Element timing -- Layout shift - -## How-Tos - -The following how-to pages provide practical information and best practices when using the Performance API: - -How to ... - -- Observe performance data -- Collect custom metrics on the client side -- Collect custom metrics on the server side -- Measure FCP -- Measure LCP -- Measure FID -- Measure TTI -- Measure TBT -- Measure CLS -- Measure TTFB -- Sync timings between window and worker contexts -- Set HTTP headers for Performance APIs to work best -- Use the Beacon API to log performance information -- Record rage clicks -- Manage buffer sizes when recording a lot of PerformanceEntry objects - -## Tutorials - -The following course helps you to take your first steps with the Performance API: - -- Instrumenting a sample application ## Specifications From 11287da5e8d64a1c918513a0dbc4021a585edb5e Mon Sep 17 00:00:00 2001 From: Chaitanya J <56331036+7777chaitanya@users.noreply.github.com> Date: Tue, 5 Sep 2023 20:43:40 +0530 Subject: [PATCH 15/94] Improve wording (#28940) * Update index.md * Update index.md --- .../web/javascript/reference/statements/try...catch/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/javascript/reference/statements/try...catch/index.md b/files/en-us/web/javascript/reference/statements/try...catch/index.md index 0e22949e161057c..170161fe7c09520 100644 --- a/files/en-us/web/javascript/reference/statements/try...catch/index.md +++ b/files/en-us/web/javascript/reference/statements/try...catch/index.md @@ -111,8 +111,8 @@ function isValidJSON(text) { The `finally` block contains statements to execute after the `try` block and `catch` block(s) execute, but before the statements following the `try...catch...finally` block. Control flow will always enter the `finally` block, which can proceed in one of the following ways: -- Immediately before the `try` block finishes execution normally (and no exceptions were thrown); -- Immediately before the `catch` block finishes execution normally; +- Immediately after the `try` block finishes execution normally (and no exceptions were thrown); +- Immediately after the `catch` block finishes execution normally; - Immediately before a control-flow statement (`return`, `throw`, `break`, `continue`) is executed in the `try` block or `catch` block. If an exception is thrown from the `try` block, even when there's no `catch` block to handle the exception, the `finally` block still executes, in which case the exception is still thrown immediately after the `finally` block finishes executing. From 9a272d3d84d344df6beb8ccfd5fe78131bb01f2e Mon Sep 17 00:00:00 2001 From: Yuta Uchijo <70194083+uchijo@users.noreply.github.com> Date: Wed, 6 Sep 2023 02:40:36 +0900 Subject: [PATCH 16/94] deleted unnecessary space in `**Warning:**` (#28950) --- files/en-us/learn/css/styling_text/fundamentals/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/learn/css/styling_text/fundamentals/index.md b/files/en-us/learn/css/styling_text/fundamentals/index.md index 890f3817b940461..2cf25b10f5d69d9 100644 --- a/files/en-us/learn/css/styling_text/fundamentals/index.md +++ b/files/en-us/learn/css/styling_text/fundamentals/index.md @@ -285,7 +285,7 @@ It is a good idea to provide a suitable generic font name at the end of the stac > **Note:** While you can use font family names that contain a space, such as `Trebuchet MS`, without quoting the name, to avoid mistakes in escaping, it is recommended to quote font family names that contain white space, digits, or punctuation characters other than hyphens. -> **Warning: ** Any font family name which could be misinterpreted as a generic family name or a CSS-wide keyword must be quoted. While the font-family names can be included as a {{cssxref("custom-ident")}} or a {{cssxref("string")}}, font family names that happen to be the same as a CSS-wide property value, like `initial`, or `inherit`, or CSS have the same name as one to the generic font family names, like `sans-serif` or `fantasy`, must be included as a quoted string. Otherwise, the font family name will be interpreted as being the equivalent CSS keyword or generic family name. When used as keywords, the generic font family names —`serif`, `sans-serif`, `monospace`, `cursive`, and `fantasy` — and the global CSS keywords MUST NOT be quoted, as strings are not interpreted as CSS keywords. +> **Warning:** Any font family name which could be misinterpreted as a generic family name or a CSS-wide keyword must be quoted. While the font-family names can be included as a {{cssxref("custom-ident")}} or a {{cssxref("string")}}, font family names that happen to be the same as a CSS-wide property value, like `initial`, or `inherit`, or CSS have the same name as one to the generic font family names, like `sans-serif` or `fantasy`, must be included as a quoted string. Otherwise, the font family name will be interpreted as being the equivalent CSS keyword or generic family name. When used as keywords, the generic font family names —`serif`, `sans-serif`, `monospace`, `cursive`, and `fantasy` — and the global CSS keywords MUST NOT be quoted, as strings are not interpreted as CSS keywords. #### A font-family example From 8d6b259128fcf2220c29e5a511486020515bbb4a Mon Sep 17 00:00:00 2001 From: Raoul Zander Date: Wed, 6 Sep 2023 01:19:23 +0200 Subject: [PATCH 17/94] Added reference to Xray Vision to use instead of ExecutionWorld.MAIN (#28474) * Added reference to Xray Vision to use instead of ExecutionWorld.MAIN * Review feedback --------- Co-authored-by: rebloor --- .../add-ons/webextensions/api/scripting/executionworld/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/files/en-us/mozilla/add-ons/webextensions/api/scripting/executionworld/index.md b/files/en-us/mozilla/add-ons/webextensions/api/scripting/executionworld/index.md index 0f1d5d2e944b612..c872776cc3ed406 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/scripting/executionworld/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/scripting/executionworld/index.md @@ -26,6 +26,7 @@ Values of this type are strings. Possible values are: > **Warning:** Due to the lack of isolation, the web page can detect the executed code and interfere with it. > Do not use the `MAIN` world unless it is acceptable for web pages to read, access, or modify the logic or data that flows through the executed code. + > `MAIN` is not supported in Firefox (although it is planned and the work to introduce it is tracked by [Bug 1736575](https://bugzil.la/1736575)). In the meantime, JavaScript code running in the isolated content script sandbox can use the Firefox "Xray vision" feature, as described in [Share objects with page scripts](/en-US/docs/Mozilla/Add-ons/WebExtensions/Sharing_objects_with_page_scripts). ## Browser compatibility From e18aa8e600733ebc25443075c563fd56361dfe98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BF=E3=81=91CAT?= Date: Wed, 6 Sep 2023 08:54:58 +0900 Subject: [PATCH 18/94] Fix links to Map/Set-like object (#28958) * Fix links to Map-like object * More fixes --------- Co-authored-by: Joshua Chen --- files/en-us/web/api/audioparammap/index.md | 2 +- files/en-us/web/api/customstateset/index.md | 2 +- files/en-us/web/api/eventcounts/index.md | 2 +- files/en-us/web/api/fontfaceset/index.md | 2 +- files/en-us/web/api/gpusupportedfeatures/index.md | 6 +++--- files/en-us/web/api/highlight/index.md | 2 +- files/en-us/web/api/highlightregistry/index.md | 2 +- files/en-us/web/api/keyboardlayoutmap/index.md | 2 +- files/en-us/web/api/midiinputmap/index.md | 2 +- files/en-us/web/api/midioutputmap/index.md | 2 +- files/en-us/web/api/rtcstatsreport/index.md | 2 +- files/en-us/web/api/xranchorset/index.md | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/files/en-us/web/api/audioparammap/index.md b/files/en-us/web/api/audioparammap/index.md index ed73781390f9468..4d80275ef7459cd 100644 --- a/files/en-us/web/api/audioparammap/index.md +++ b/files/en-us/web/api/audioparammap/index.md @@ -9,7 +9,7 @@ browser-compat: api.AudioParamMap The **`AudioParamMap`** interface of the [Web Audio API](/en-US/docs/Web/API/Web_Audio_API) represents an iterable and read-only set of multiple audio parameters. -An `AudioParamMap` instance is a read-only [`Map`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#map-like_objects), in which each key is the name string for a parameter, and the corresponding value is an {{domxref("AudioParam")}} containing the value of that parameter. +An `AudioParamMap` instance is a read-only [`Map`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#map-like_browser_apis), in which each key is the name string for a parameter, and the corresponding value is an {{domxref("AudioParam")}} containing the value of that parameter. ## Instance properties diff --git a/files/en-us/web/api/customstateset/index.md b/files/en-us/web/api/customstateset/index.md index 65301ab5ea90e4b..98462d442e0b81f 100644 --- a/files/en-us/web/api/customstateset/index.md +++ b/files/en-us/web/api/customstateset/index.md @@ -17,7 +17,7 @@ An HTML form element, such as a checkbox has different _states_, "checked" and " An instance of `CustomStateList` is returned by {{domxref("ElementInternals.states")}}. -A `CustomStateList` instance is a [`Set`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#set-like_objects) that can hold an ordered set of state values. +A `CustomStateList` instance is a [`Set`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#set-like_browser_apis) that can hold an ordered set of state values. Each value stored in a `CustomStateList` is a ``, in the format `--mystate`. ### Interaction with CSS diff --git a/files/en-us/web/api/eventcounts/index.md b/files/en-us/web/api/eventcounts/index.md index 8c62edc250d7854..72f866e2e2fe93b 100644 --- a/files/en-us/web/api/eventcounts/index.md +++ b/files/en-us/web/api/eventcounts/index.md @@ -9,7 +9,7 @@ browser-compat: api.EventCounts The **`EventCounts`** interface of the [Performance API](/en-US/docs/Web/API/Performance_API) provides the number of events that have been dispatched for each event type. -An `EventCounts` instance is a read-only [`Map`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#map-like_objects), in which each key is the name string for an event type, and the corresponding value is an integer indicating the number of events that have been dispatched for that event type. +An `EventCounts` instance is a read-only [`Map`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#map-like_browser_apis), in which each key is the name string for an event type, and the corresponding value is an integer indicating the number of events that have been dispatched for that event type. ## Constructor diff --git a/files/en-us/web/api/fontfaceset/index.md b/files/en-us/web/api/fontfaceset/index.md index 5df7f80b0fb6292..937a0e01b75b1e0 100644 --- a/files/en-us/web/api/fontfaceset/index.md +++ b/files/en-us/web/api/fontfaceset/index.md @@ -9,7 +9,7 @@ browser-compat: api.FontFaceSet The **`FontFaceSet`** interface of the [CSS Font Loading API](/en-US/docs/Web/API/CSS_Font_Loading_API) manages the loading of font-faces and querying of their download status. -A `FontFaceSet` instance is a [`Set`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#set-like_objects) that can hold an ordered set of {{domxref("FontFace")}} objects. +A `FontFaceSet` instance is a [`Set`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#set-like_browser_apis) that can hold an ordered set of {{domxref("FontFace")}} objects. This property is available as {{domxref("Document.fonts")}}, or `self.fonts` in [web workers](/en-US/docs/Web/API/Web_Workers_API). diff --git a/files/en-us/web/api/gpusupportedfeatures/index.md b/files/en-us/web/api/gpusupportedfeatures/index.md index fc6c2798caf6f8e..b71b5938d026a6c 100644 --- a/files/en-us/web/api/gpusupportedfeatures/index.md +++ b/files/en-us/web/api/gpusupportedfeatures/index.md @@ -9,7 +9,7 @@ browser-compat: api.GPUSupportedFeatures {{APIRef("WebGPU API")}}{{SeeCompatTable}} -The **`GPUSupportedFeatures`** interface of the {{domxref("WebGPU API", "WebGPU API", "", "nocode")}} is a [`Set`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#set-like_objects) that describes additional functionality supported by a {{domxref("GPUAdapter")}}. +The **`GPUSupportedFeatures`** interface of the {{domxref("WebGPU API", "WebGPU API", "", "nocode")}} is a [`Set`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#set-like_browser_apis) that describes additional functionality supported by a {{domxref("GPUAdapter")}}. The `GPUSupportedFeatures` object for the current adapter is accessed via the {{domxref("GPUAdapter.features")}} property. @@ -28,14 +28,14 @@ We have not listed the exact set of additional features available to be used in ## Instance properties -The following properties are available to all read-only [`Set`-like objects](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#set-like_objects) (the links below are to the {{jsxref("Set")}} global object reference page). +The following properties are available to all read-only [`Set`-like objects](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#set-like_browser_apis) (the links below are to the {{jsxref("Set")}} global object reference page). - {{jsxref("Set.prototype.size", "size")}} {{Experimental_Inline}} - : Returns the number of values in the set. ## Instance methods -The following methods are available to all read-only [`Set`-like objects](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#set-like_objects) (the below links are to the {{jsxref("Set")}} global object reference page). +The following methods are available to all read-only [`Set`-like objects](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#set-like_browser_apis) (the below links are to the {{jsxref("Set")}} global object reference page). - {{jsxref("Set.prototype.has()", "has()")}} {{Experimental_Inline}} - : Returns a boolean asserting whether an element is present with the given value in the set or not. diff --git a/files/en-us/web/api/highlight/index.md b/files/en-us/web/api/highlight/index.md index 9cbdf09ab163b97..001edfaa0033a63 100644 --- a/files/en-us/web/api/highlight/index.md +++ b/files/en-us/web/api/highlight/index.md @@ -13,7 +13,7 @@ The **`Highlight`** interface of the [CSS Custom Highlight API](/en-US/docs/Web/ To style arbitrary ranges in a page, instantiate a new `Highlight` object, add one or more `Range` objects to it, and register it using the {{domxref("HighlightRegistry")}}. -A `Highlight` instance is a [`Set`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#set-like_objects) that can hold one or more `Range` objects. +A `Highlight` instance is a [`Set`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#set-like_browser_apis) that can hold one or more `Range` objects. {{InheritanceDiagram}} diff --git a/files/en-us/web/api/highlightregistry/index.md b/files/en-us/web/api/highlightregistry/index.md index 612711c6783d56a..8a8783e8821b2a1 100644 --- a/files/en-us/web/api/highlightregistry/index.md +++ b/files/en-us/web/api/highlightregistry/index.md @@ -12,7 +12,7 @@ browser-compat: api.HighlightRegistry The **`HighlightRegistry`** interface of the [CSS Custom Highlight API](/en-US/docs/Web/API/CSS_Custom_Highlight_API) is used to register {{domxref("Highlight")}} objects to be styled using the API. It is accessed via {{domxref("CSS.highlights_static", "CSS.highlights")}}. -A `HighlightRegistry` instance is a [`Map`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#map-like_objects), in which each key is the name string for a custom highlight, and the corresponding value is the associated {{domxref("Highlight")}} object. +A `HighlightRegistry` instance is a [`Map`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#map-like_browser_apis), in which each key is the name string for a custom highlight, and the corresponding value is the associated {{domxref("Highlight")}} object. {{InheritanceDiagram}} diff --git a/files/en-us/web/api/keyboardlayoutmap/index.md b/files/en-us/web/api/keyboardlayoutmap/index.md index 93d50e5276e7f2c..0e9c8dbf7c46ba1 100644 --- a/files/en-us/web/api/keyboardlayoutmap/index.md +++ b/files/en-us/web/api/keyboardlayoutmap/index.md @@ -11,7 +11,7 @@ browser-compat: api.KeyboardLayoutMap The **`KeyboardLayoutMap`** interface of the [Keyboard API](/en-US/docs/Web/API/Keyboard_API) is a read-only object with functions for retrieving the string associated with specific physical keys. -A `KeyboardLayoutMap` instance is a read-only [`Map`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#map-like_objects), in which each key is a string identifying the unique physical key on the keyboard (a "key code"), and the corresponding value is the associated key attribute value (which may be affected by the keyboard layout, and so on). +A `KeyboardLayoutMap` instance is a read-only [`Map`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#map-like_browser_apis), in which each key is a string identifying the unique physical key on the keyboard (a "key code"), and the corresponding value is the associated key attribute value (which may be affected by the keyboard layout, and so on). A list of valid keys is found in the [UI Events KeyboardEvent code Values](https://www.w3.org/TR/uievents-code/#key-alphanumeric-writing-system) specification. diff --git a/files/en-us/web/api/midiinputmap/index.md b/files/en-us/web/api/midiinputmap/index.md index 27c05fa0339ecd6..8646a32ccf24a3f 100644 --- a/files/en-us/web/api/midiinputmap/index.md +++ b/files/en-us/web/api/midiinputmap/index.md @@ -9,7 +9,7 @@ browser-compat: api.MIDIInputMap The **`MIDIInputMap`** read-only interface of the [Web MIDI API](/en-US/docs/Web/API/Web_MIDI_API) provides the set of MIDI input ports that are currently available. -A `MIDIInputMap` instance is a read-only [`Map`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#map-like_objects), in which each key is the ID string for MIDI input, and the associated value is the corresponding {{domxref("MIDIInput")}} object. +A `MIDIInputMap` instance is a read-only [`Map`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#map-like_browser_apis), in which each key is the ID string for MIDI input, and the associated value is the corresponding {{domxref("MIDIInput")}} object. ## Specifications diff --git a/files/en-us/web/api/midioutputmap/index.md b/files/en-us/web/api/midioutputmap/index.md index e1db9792ed76ba2..b7068123ea5264e 100644 --- a/files/en-us/web/api/midioutputmap/index.md +++ b/files/en-us/web/api/midioutputmap/index.md @@ -9,7 +9,7 @@ browser-compat: api.MIDIOutputMap The **`MIDIOutputMap`** read-only interface of the [Web MIDI API](/en-US/docs/Web/API/Web_MIDI_API) provides the set of MIDI output ports that are currently available. -A `MIDIOutputMap` instance is a read-only [`Map`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#map-like_objects), in which each key is the ID string for MIDI output, and the associated value is the corresponding {{domxref("MIDIOutput")}} object. +A `MIDIOutputMap` instance is a read-only [`Map`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#map-like_browser_apis), in which each key is the ID string for MIDI output, and the associated value is the corresponding {{domxref("MIDIOutput")}} object. ## Specifications diff --git a/files/en-us/web/api/rtcstatsreport/index.md b/files/en-us/web/api/rtcstatsreport/index.md index 2587c4d8d19b4ad..703263867b48759 100644 --- a/files/en-us/web/api/rtcstatsreport/index.md +++ b/files/en-us/web/api/rtcstatsreport/index.md @@ -9,7 +9,7 @@ browser-compat: api.RTCStatsReport The **`RTCStatsReport`** interface of the [WebRTC API](/en-US/docs/Web/API/WebRTC_API) provides a statistics report for a {{domxref("RTCPeerConnection")}}, {{domxref("RTCRtpSender")}}, or {{domxref("RTCRtpReceiver")}}. -An `RTCStatsReport` instance is a read-only [`Map`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#map-like_objects), in which each key is an identifier for an object for which statistics are being reported, and the corresponding value is a dictionary object providing the statistics. +An `RTCStatsReport` instance is a read-only [`Map`-like object](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#map-like_browser_apis), in which each key is an identifier for an object for which statistics are being reported, and the corresponding value is a dictionary object providing the statistics. ## Instance properties diff --git a/files/en-us/web/api/xranchorset/index.md b/files/en-us/web/api/xranchorset/index.md index 9955395259bcd30..fb5501b31ac1e74 100644 --- a/files/en-us/web/api/xranchorset/index.md +++ b/files/en-us/web/api/xranchorset/index.md @@ -9,7 +9,7 @@ browser-compat: api.XRAnchorSet {{APIRef("WebXR Device API")}}{{SeeCompatTable}} -The **`XRAnchorSet`** interface exposes a collection of anchors. Its instances are returned by {{domxref("XRFrame.trackedAnchors")}} and are [`Set`-like objects](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#set-like_objects). +The **`XRAnchorSet`** interface exposes a collection of anchors. Its instances are returned by {{domxref("XRFrame.trackedAnchors")}} and are [`Set`-like objects](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#set-like_browser_apis). ## Instance properties From 7a3d9dfec7fdc7b9bebbce68bcc1c62ff290ff0b Mon Sep 17 00:00:00 2001 From: Hakeem <65634467+Ahmed-Hakeem@users.noreply.github.com> Date: Tue, 5 Sep 2023 16:55:21 -0700 Subject: [PATCH 19/94] add more details to toStringTag symbol in built-in objects (#28915) * add more details to toStringTag symbol in built-in objects * Update index.md Co-authored-by: Joshua Chen * Apply suggestions from code review --------- Co-authored-by: Joshua Chen --- .../reference/global_objects/symbol/tostringtag/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/en-us/web/javascript/reference/global_objects/symbol/tostringtag/index.md b/files/en-us/web/javascript/reference/global_objects/symbol/tostringtag/index.md index 3e9c24ab3aff93a..ddac37983123d3d 100644 --- a/files/en-us/web/javascript/reference/global_objects/symbol/tostringtag/index.md +++ b/files/en-us/web/javascript/reference/global_objects/symbol/tostringtag/index.md @@ -35,7 +35,9 @@ Object.prototype.toString.call(null); // "[object Null]" ### Built-in toStringTag symbols -Most built-in objects provide their own `@@toStringTag` property. All built-in objects' `@@toStringTag` property is not writable, not enumerable, and configurable. +Most built-in objects provide their own `@@toStringTag` property. Almost all built-in objects' `@@toStringTag` property is not writable, not enumerable, and configurable; the exception is {{jsxref("Iterator")}}, which is writable for compatibility reasons. + +For constructor objects like {{jsxref("Promise")}}, the property is installed on `Constructor.prototype`, so that all instances of the constructor inherit `@@toStringTag` and can be stringified. For non-constructor objects like {{jsxref("Math")}} and {{jsxref("JSON")}}, the property is installed as a static property, so that the namespace object itself can be stringified. Sometimes, the constructor also provides its own `toString` method (for example, {{jsxref("Intl.Locale")}}), in which case the `@@toStringTag` property is only used when you explicitly call `Object.prototype.toString` on it. ```js Object.prototype.toString.call(new Map()); // "[object Map]" From a4b661ab67e434b6737a826eab4260e3413d06c1 Mon Sep 17 00:00:00 2001 From: Onkar Ruikar <87750369+OnkarRuikar@users.noreply.github.com> Date: Wed, 6 Sep 2023 08:55:27 +0530 Subject: [PATCH 20/94] fix(css): scroll chaining can be stopped on iframes (#28918) * fix(css): scroll chaining can be stopped on iframes * Update files/en-us/web/css/overscroll-behavior/index.md Co-authored-by: wbamberg --------- Co-authored-by: wbamberg --- files/en-us/web/css/overscroll-behavior/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/css/overscroll-behavior/index.md b/files/en-us/web/css/overscroll-behavior/index.md index be071d6b297c10c..2d5fd2e570581ac 100644 --- a/files/en-us/web/css/overscroll-behavior/index.md +++ b/files/en-us/web/css/overscroll-behavior/index.md @@ -56,7 +56,7 @@ By default, mobile browsers tend to provide a "bounce" effect or even a page ref In some cases, these behaviors are not desirable. You can use `overscroll-behavior` to get rid of unwanted scroll chaining and the browser's Facebook/Twitter app-inspired "pull to refresh"-type behavior. -Note that this property applies only to {{Glossary("Scroll_container", "scroll containers")}}. In particular, since an [`