Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/en-us/glossary/application_context/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: glossary-definition

{{GlossarySidebar}}

An **application context** is a top-level [browsing context](/en-US/docs/Glossary/Browsing_context) that has a [manifest](/en-US/docs/Web/Manifest) applied to it.
An **application context** is a top-level {{glossary("browsing context")}} that has a [manifest](/en-US/docs/Web/Manifest) applied to it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: there's no need to make this kind of change in the future


If an application context is created as a result of the user agent being asked to navigate to a deep link, the user agent must immediately navigate to the deep link with replacement enabled. Otherwise, when the application context is created, the user agent must immediately navigate to the start URL with replacement enabled.

Expand Down
3 changes: 2 additions & 1 deletion files/en-us/glossary/argument/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ function example(parameter) {
## See also

- [Difference between parameter and argument](/en-US/docs/Glossary/Parameter#parameters_versus_arguments)
- The {{jsxref("Functions/arguments", "arguments")}} object in {{glossary("JavaScript")}}
- {{jsxref("Functions/arguments", "arguments")}} JavaScript object
- Related glossary terms:
- {{Glossary("Function")}}
- {{Glossary("Parameter")}}
- {{glossary("JavaScript")}}
2 changes: 1 addition & 1 deletion files/en-us/glossary/aria/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ The specification, for example, allows you to add the attribute `role="alert"` t
- [ARIA Authoring Practices Guide (APG)](https://www.w3.org/WAI/ARIA/apg/)
- [Accessibility](/en-US/docs/Web/Accessibility)
- [Learn accessibility](/en-US/docs/Learn/Accessibility)
- [Glossary](/en-US/docs/Glossary)
- Related glossary terms
- {{Glossary("Accessibility")}}
- {{Glossary("WAI")}}
3 changes: 2 additions & 1 deletion files/en-us/glossary/beacon/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ There is a [W3C Draft Beacon Specification](https://w3c.github.io/beacon/) to st

## See also

- [Real User Monitoring (RUM)](/en-US/docs/Glossary/Real_User_Monitoring)
- Related glossary terms:
- {{glossary("Real User Monitoring")}} (RUM)
3 changes: 2 additions & 1 deletion files/en-us/glossary/block-level_content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ p {

## See also

- [Inline-level content](/en-US/docs/Glossary/Inline-level_content)
- Related glossary terms:
- {{glossary("Inline-level content")}}
- [Block formatting context](/en-US/docs/Web/CSS/CSS_display/Block_formatting_context)
- {{cssxref("display")}}
- [`writing-mode`](/en-US/docs/Web/CSS/writing-mode)
1 change: 1 addition & 0 deletions files/en-us/glossary/boolean/aria/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ In ARIA, booleans only come in the form of strings `"true"` and `"false"`.

- Related glossary terms:
- {{Glossary("Enumerated")}} that contains more behavioral details and examples of ARIA boolean attributes
- {{Glossary("Boolean/HTML", "Boolean attribute")}} in HTML
2 changes: 2 additions & 0 deletions files/en-us/glossary/brotli_compression/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Brotli is compatible with most modern browsers, but you may want to consider a f
- Related glossary terms:
- {{glossary("Lossless compression")}}
- {{glossary("Lossy compression")}}
- {{Glossary("Gzip compression")}}
- {{Glossary("Zstandard compression")}}
- [brotli.org](https://brotli.org/)
- [Brotli GitHub repository](https://github.com/google/brotli)
- [RFC 7932: Brotli Compressed Data Format](https://tools.ietf.org/html/rfc7932)
Expand Down
3 changes: 2 additions & 1 deletion files/en-us/glossary/browsing_context/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ Communication between browsing contexts is severely constrained. Between browsin

## See also

- See {{glossary("origin")}}
- Related glossary terms:
- {{glossary("Origin")}}
5 changes: 3 additions & 2 deletions files/en-us/glossary/code_splitting/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ Code splitting is a feature supported by bundlers like [Webpack](https://webpack
## See also

- [Lazy loading](/en-US/docs/Web/Performance/Lazy_loading)
- [HTTP/2](/en-US/docs/Glossary/HTTP_2)
- [Tree shaking](/en-US/docs/Glossary/Tree_shaking)
- Related glossary terms:
- {{Glossary("HTTP 2", "HTTP/2")}}
- {{Glossary("Tree shaking")}}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A [**CORS-safelisted request header**](https://fetch.spec.whatwg.org/#cors-safel
- {{HTTPHeader("Content-Type")}}
- {{HTTPHeader("Range")}}

When containing only these headers (and values that meet the additional requirements laid out below), a request doesn't need to send a {{glossary("preflight request")}} in the context of [CORS](/en-US/docs/Glossary/CORS).
When containing only these headers (and values that meet the additional requirements laid out below), a request doesn't need to send a {{glossary("preflight request")}} in the context of {{Glossary("CORS")}}.

You can safelist more headers using the {{HTTPHeader("Access-Control-Allow-Headers")}} header and also list the above headers there to circumvent the following additional restrictions.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/glossary/csp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: glossary-definition

{{GlossarySidebar}}

A **CSP** ([Content Security Policy](/en-US/docs/Web/HTTP/CSP)) is used to detect and mitigate certain types of website related attacks like {{Glossary("Cross-site_scripting")}}, [clickjacking](/en-US/docs/Glossary/Clickjacking) and data injections.
A **CSP** ([Content Security Policy](/en-US/docs/Web/HTTP/CSP)) is used to detect and mitigate certain types of website related attacks like {{Glossary("Cross-site_scripting")}}, {{Glossary("clickjacking")}} and data injections.

The implementation is based on an {{Glossary("HTTP")}} header called {{HTTPHeader("Content-Security-Policy")}}.

Expand Down
8 changes: 4 additions & 4 deletions files/en-us/glossary/deep_copy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: glossary-definition

{{GlossarySidebar}}

A **deep copy** of an object is a copy whose properties do not share the same references (point to the same underlying values) as those of the source object from which the copy was made. As a result, when you change either the source or the copy, you can be assured you're not causing the other object to change too. That behavior contrasts with the behavior of a [shallow copy](/en-US/docs/Glossary/Shallow_copy), in which changes to nested properties in the source or the copy may cause the other object to change too.
A **deep copy** of an object is a copy whose properties do not share the same references (point to the same underlying values) as those of the source object from which the copy was made. As a result, when you change either the source or the copy, you can be assured you're not causing the other object to change too. That behavior contrasts with the behavior of a {{Glossary("shallow copy")}}, in which changes to nested properties in the source or the copy may cause the other object to change too.

Two objects `o1` and `o2` are _structurally equivalent_ if their observed behaviors are the same. These behaviors include:

Expand All @@ -25,11 +25,11 @@ We can now define deep copies more formally as:

Deep copies may or may not have their prototype chains copied (and often they do not). But two objects with structurally non-equivalent prototype chains (for example, one is an array and the other is a plain object) are never copies of each other.

The copy of an object whose properties all have primitive values fits the definition of both a deep copy and a [shallow copy](/en-US/docs/Glossary/Shallow_copy). It is somewhat useless to talk about the depth of such a copy, though, because it has no nested properties and we usually talk about deep copying in the context of mutating nested properties.
The copy of an object whose properties all have primitive values fits the definition of both a deep copy and a {{Glossary("shallow copy")}}. It is somewhat useless to talk about the depth of such a copy, though, because it has no nested properties and we usually talk about deep copying in the context of mutating nested properties.

In JavaScript, standard built-in object-copy operations ([spread syntax](/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax), [`Array.prototype.concat()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat), [`Array.prototype.slice()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice), [`Array.from()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from), and [`Object.assign()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)) do not create deep copies (instead, they create shallow copies).

One way to make a deep copy of a JavaScript object, if it can be [serialized](/en-US/docs/Glossary/Serialization), is to use {{jsxref("JSON.stringify()")}} to convert the object to a JSON string, and then {{jsxref("JSON.parse()")}} to convert the string back into a (completely new) JavaScript object:
One way to make a deep copy of a JavaScript object, if it can be {{Glossary("serialization", "serialized")}}, is to use {{jsxref("JSON.stringify()")}} to convert the object to a JSON string, and then {{jsxref("JSON.parse()")}} to convert the string back into a (completely new) JavaScript object:

```js
const ingredientsList = ["noodles", { list: ["eggs", "flour", "water"] }];
Expand All @@ -46,7 +46,7 @@ console.log(ingredientsList[1].list);
// Array(3) [ "eggs", "flour", "water" ]
```

However, while the object in the code above is simple enough to be [serializable](/en-US/docs/Glossary/Serialization), many JavaScript objects are not serializable at all — for example, [functions](/en-US/docs/Web/JavaScript/Guide/Functions) (with closures), [Symbols](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol), objects that represent HTML elements in the [HTML DOM API](/en-US/docs/Web/API/HTML_DOM_API), recursive data, and many other cases. Calling `JSON.stringify()` to serialize the objects in those cases will fail. So there's no way to make deep copies of such objects.
However, while the object in the code above is simple enough to be {{Glossary("serialization", "serializable")}}, many JavaScript objects are not serializable at all — for example, [functions](/en-US/docs/Web/JavaScript/Guide/Functions) (with closures), [Symbols](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol), objects that represent HTML elements in the [HTML DOM API](/en-US/docs/Web/API/HTML_DOM_API), recursive data, and many other cases. Calling `JSON.stringify()` to serialize the objects in those cases will fail. So there's no way to make deep copies of such objects.

The web API [`structuredClone()`](/en-US/docs/Web/API/structuredClone) also creates deep copies and has the advantage of allowing [transferable objects](/en-US/docs/Web/API/Web_Workers_API/Transferable_objects) in the source to be _transferred_ to the new copy, rather than just cloned. It also handles more data types, such as `Error`. But note that `structuredClone()` isn't a feature of the JavaScript language itself — instead it's a feature of browsers and other JavaScript hosts that implement web APIs. And calling `structuredClone()` to clone a non-serializable object will fail in the same way that calling `JSON.stringify()` to serialize it will fail.

Expand Down
4 changes: 2 additions & 2 deletions files/en-us/glossary/domain_sharding/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ HTTP2 supports unlimited concurrent requests making domain sharding an obsolete

- Related glossary terms:
- {{Glossary("TLS")}}
- [DNS](/en-US/docs/Glossary/DNS)
- [HTTP/2](/en-US/docs/Glossary/HTTP_2)
- {{Glossary("DNS")}}
- {{Glossary("HTTP 2", "HTTP/2")}}
12 changes: 6 additions & 6 deletions files/en-us/glossary/effective_connection_type/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ page-type: glossary-definition

The values of '`slow-2g`', '`2g`', '`3g`', and '`4g`' are determined using observed round-trip times and downlink values.

| ECT | Minimum [RTT](/en-US/docs/Glossary/Round_Trip_Time) | Maximum downlink | Explanation |
| --------- | --------------------------------------------------- | ---------------- | -------------------------------------------------------------------------------------------------------- |
| `slow-2g` | 2000ms | 50 Kbps | The network is suited for small transfers only such as text-only pages. |
| `2g` | 1400ms | 70 Kbps | The network is suited for transfers of small images. |
| `3g` | 270ms | 700 Kbps | The network is suited for transfers of large assets such as high resolution images, audio, and SD video. |
| `4g` | 0ms | ∞ | The network is suited for HD video, real-time video, etc. |
| ECT | Minimum {{Glossary("Round Trip Time", "RTT")}} | Maximum downlink | Explanation |
| --------- | ---------------------------------------------- | ---------------- | -------------------------------------------------------------------------------------------------------- |
| `slow-2g` | 2000ms | 50 Kbps | The network is suited for small transfers only such as text-only pages. |
| `2g` | 1400ms | 70 Kbps | The network is suited for transfers of small images. |
| `3g` | 270ms | 700 Kbps | The network is suited for transfers of large assets such as high resolution images, audio, and SD video. |
| `4g` | 0ms | ∞ | The network is suited for HD video, real-time video, etc. |

[effectiveType](/en-US/docs/Web/API/NetworkInformation/effectiveType) is a property of the [Network Information API](/en-US/docs/Web/API/Network_Information_API), exposed to JavaScript via the [navigator.connection](/en-US/docs/Web/API/Navigator/connection) object. To see your effective connection type, open the console of the developer tools of a supporting browser and enter the following:

Expand Down
4 changes: 2 additions & 2 deletions files/en-us/glossary/enumerated/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In computer science, an **enumerated** type is a data type consisting of a limit

In HTML, [enumerated attributes](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#enumerated-attribute) are attributes with a limited, predefined set of text values. For example, the global HTML [`dir`](/en-US/docs/Web/HTML/Global_attributes/dir) attribute has three valid values: `ltr`, `rtl`, and `auto`.

Each enumerated attribute has a default value for when the attribute is present without a value (the value is missing), and a default value for when the attribute is assigned an invalid value. Unlike [Boolean](/en-US/docs/Glossary/Boolean) HTML attributes — which are always true when the attribute is present whether the value is present, omitted, or invalid — with enumerated HTML attributes, the default for an omitted value may be different from the default for invalid values. For example, the global HTML [`contenteditable`](/en-US/docs/Web/HTML/Global_attributes/contenteditable) attribute has two valid keywords: `true` and `false`. If the attribute is present but no value is set, the value is `true`. If a value is set, but is invalid, such as `contenteditable="contenteditable"`, the value maps to a third state, `inherit`.
Each enumerated attribute has a default value for when the attribute is present without a value (the value is missing), and a default value for when the attribute is assigned an invalid value. Unlike {{Glossary("Boolean/HTML", "Boolean attribute")}} HTML attributes — which are always true when the attribute is present whether the value is present, omitted, or invalid — with enumerated HTML attributes, the default for an omitted value may be different from the default for invalid values. For example, the global HTML [`contenteditable`](/en-US/docs/Web/HTML/Global_attributes/contenteditable) attribute has two valid keywords: `true` and `false`. If the attribute is present but no value is set, the value is `true`. If a value is set, but is invalid, such as `contenteditable="contenteditable"`, the value maps to a third state, `inherit`.

## ARIA enumerated attributes

Expand All @@ -26,6 +26,6 @@ In JavaScript, enumerable properties are those properties whose internal enumera

## See also

- [Boolean](/en-US/docs/Glossary/Boolean)
- {{Glossary("Boolean")}}
- [JavaScript data types and data structures](/en-US/docs/Web/JavaScript/Data_structures)
- [enumerated attributes](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#enumerated-attribute) in the HTML Standard
2 changes: 1 addition & 1 deletion files/en-us/glossary/event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: glossary-definition

{{GlossarySidebar}}

Events are assets generated by [DOM](/en-US/docs/Glossary/DOM) elements, which can be manipulated by a JavaScript code.
Events are assets generated by {{Glossary("DOM")}} elements, which can be manipulated by a JavaScript code.

## See also

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/glossary/fallback_alignment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: glossary-definition

{{GlossarySidebar}}

In [CSS Box Alignment](/en-US/docs/Web/CSS/CSS_box_alignment), a fallback alignment is specified in order to deal with cases where the requested alignment cannot be fulfilled. For example, if you specify `justify-content: space-between` there must be more than one [alignment subject](/en-US/docs/Glossary/Alignment_Subject). If there is not, the fallback alignment is used. This is specified per alignment method, as detailed below.
In [CSS Box Alignment](/en-US/docs/Web/CSS/CSS_box_alignment), a fallback alignment is specified in order to deal with cases where the requested alignment cannot be fulfilled. For example, if you specify `justify-content: space-between` there must be more than one {{Glossary("alignment subject")}}. If there is not, the fallback alignment is used. This is specified per alignment method, as detailed below.

- First baseline
- : `start`
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/glossary/falsy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The following table provides a complete list of JavaScript falsy values:
| `""` | String | Empty [string](/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) value, also including `''` and ` `` `. |
| {{domxref("document.all")}} | Object | The only falsy object in JavaScript is the built-in {{domxref("document.all")}}. |

The values `null` and `undefined` are also [nullish](/en-US/docs/Glossary/Nullish).
The values `null` and `undefined` are also {{Glossary("nullish")}}.

## Examples

Expand Down
7 changes: 4 additions & 3 deletions files/en-us/glossary/first_contentful_paint/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ _The First Contentful Paint_ timestamp is when the browser first rendered any te

## See also

- [First paint](/en-US/docs/Glossary/First_paint)
- [`PerformancePaintTiming`](/en-US/docs/Web/API/PerformancePaintTiming)
- [Largest Contentful Paint](/en-US/docs/Glossary/Largest_contentful_paint)
- [First meaningful paint](/en-US/docs/Glossary/First_meaningful_paint)
- Related glossary terms:
- {{Glossary("First paint")}}
- {{Glossary("Largest contentful paint")}}
- {{Glossary("First meaningful paint")}}
- [First Contentful Paint](https://web.dev/articles/fcp) at web.dev
4 changes: 2 additions & 2 deletions files/en-us/glossary/first_cpu_idle/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ page-type: glossary-definition
## See also

- Metrics which replaced First CPU Idle:
- [Time to interactive](/en-US/docs/Glossary/Time_to_interactive)
- [Total blocking time](https://developer.chrome.com/docs/lighthouse/performance/lighthouse-total-blocking-time/)
- {{Glossary("Time to interactive")}}
- [Total blocking time](https://developer.chrome.com/docs/lighthouse/performance/lighthouse-total-blocking-time/)
5 changes: 3 additions & 2 deletions files/en-us/glossary/first_meaningful_paint/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ FMP is very sensitive to small differences in the page load. This can lead to in

## See also

- [First contentful paint](/en-US/docs/Glossary/First_contentful_paint)
- [Largest Contentful Paint](https://wicg.github.io/largest-contentful-paint/)
- Related glossary terms:
- {{Glossary("First contentful paint")}}
- {{Glossary("Largest contentful paint")}}
7 changes: 4 additions & 3 deletions files/en-us/glossary/first_paint/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ page-type: glossary-definition

## See also

- [First contentful paint](/en-US/docs/Glossary/First_contentful_paint)
- [`PerformancePaintTiming`](/en-US/docs/Web/API/PerformancePaintTiming)
- [Largest Contentful Paint](/en-US/docs/Glossary/Largest_contentful_paint)
- [First meaningful paint](/en-US/docs/Glossary/First_meaningful_paint)
- Related glossary terms:
- {{Glossary("First contentful paint")}}
- {{Glossary("Largest contentful paint")}}
- {{Glossary("First meaningful paint")}}
2 changes: 1 addition & 1 deletion files/en-us/glossary/forbidden_header_name/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ Forbidden header names start with `Proxy-` or `Sec-`, or are one of the followin
## See also

- Related glossary terms:
- {{Glossary("Forbidden response header name")}}
- {{Glossary("Forbidden response header name")}}
Loading