Skip to content

Commit

Permalink
Merge branch 'main' into update-web-standards-model
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdavidmills authored Jan 21, 2025
2 parents 5f662ea + 3714892 commit afc941f
Show file tree
Hide file tree
Showing 344 changed files with 17,870 additions and 499 deletions.
2 changes: 1 addition & 1 deletion files/en-us/glossary/baseline/typography/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ Other writing systems have different baselines. For example, Tibetan and similar

## See also

- [CSS box alignment](/en-US/docs/Web/CSS/CSS_box_alignment/box_alignment#types_of_alignment)
- [CSS box alignment](/en-US/docs/Web/CSS/CSS_box_alignment/Box_alignment#types_of_alignment)
- [CSS inline layout](/en-US/docs/Web/CSS/CSS_inline_layout) module
- [Baseline (Typography)](<https://en.wikipedia.org/wiki/Baseline_(typography)>) on Wikipedia
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Learning outcomes:
Resources:

- [Accessibility overview](/en-US/docs/Learn_web_development/Core/Accessibility)
- [Inclusive design principles](https://inclusivedesignprinciples.org/), inclusivedesignprinciples.org
- [Inclusive design principles](https://inclusivedesignprinciples.info/), inclusivedesignprinciples.info

## Design briefs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,9 @@ function greeting() {
}
```

Both functions you want to call are called `greeting()`, but you can only ever access the `first.js` file's `greeting()` function (the second one is ignored). In addition, an error results when attempting (in the `second.js` file) to assign a new value to the `name` variable — because it was already declared with `const`, and so can't be reassigned.
You will see that the second script does not load and run at all, and an error is printed in the console: `Uncaught SyntaxError: Identifier 'name' has already been declared`. This is because the `name` constant is already declared in `first.js`, and you can't declare the same constant twice in the same scope. Because the second script did not load, the `greeting()` function from `second.js` is not available to be called. Therefore, you will see an alert box displaying `Hello Chris: welcome to our company.`.

Try removing the second `const name = "Zaptec";` line from `second.js` and reloading the page. Now both scripts execute, and the alert box says `Our company is called Chris.`. Functions are allowed to be redeclared, and the last declaration gets used. The previous declarations are effectively overwritten.

> [!NOTE]
> You can see this example [running live on GitHub](https://mdn.github.io/learning-area/javascript/building-blocks/functions/conflict.html) (see also the [source code](https://github.com/mdn/learning-area/tree/main/javascript/building-blocks/functions)).
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/learn_web_development/core/scripting/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ JavaScript is a huge topic, with so many different features, styles, and techniq

## Prerequisites

Before starting this module, you don't need any previous JavaScript knowledge, but you should have worked through the previous modules in the course. You should have at least know [HTML](/en-US/docs/Learn_web_development/Core/Structuring_content) and the [basic fundamentals of CSS](/en-US/docs/Learn_web_development/Core/Styling_basics).
Before starting this module, you don't need any previous JavaScript knowledge, but you should have worked through the previous modules in the course. You should at least know [HTML](/en-US/docs/Learn_web_development/Core/Structuring_content) and the [basic fundamentals of CSS](/en-US/docs/Learn_web_development/Core/Styling_basics).

> [!NOTE]
> If you are working on a computer/tablet/other device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as [JSBin](https://jsbin.com/) or [Glitch](https://glitch.com/).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ When you built up the "Guess the number" game in the previous article, you may h

Generally speaking, when you do something wrong in code, there are two main types of error that you'll come across:

- **Syntax errors**: These are spelling errors in your code that actually cause the program not to run at all, or stop working part way through — you will usually be provided with some error messages too. These are usually okay to fix, as long as you are familiar with the right tools and know what the error messages mean!
- **Syntax errors**: These are spelling errors in your code that actually cause the program not to run at all, or stop working part way through — you will usually be provided with some error messages too. These are usually not too hard to fix, as long as you are familiar with the right tools and know what the error messages mean!
- **Logic errors**: These are errors where the syntax is actually correct but the code is not what you intended it to be, meaning that program runs successfully but gives incorrect results. These are often harder to fix than syntax errors, as there usually isn't an error message to direct you to the source of the error.

Okay, so it's not quite _that_ simple — there are some other differentiators as you drill down deeper. But the above classifications will do at this early stage in your career. We'll look at both of these types going forward.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,7 @@ In addition to branches, it is possible to create `tags` on any branch and later
### Create an account and repository on GitHub
First we will create a free account on GitHub.
With a free account you can't create private repos, but you can create as many _public_ repositories ("repos") as you like.
First we will create an account on GitHub (this is free).
Then we create and configure a repository named "django_local_library" for storing the [Local library website](/en-US/docs/Learn_web_development/Extensions/Server-side/Django/Tutorial_local_library_website) as we evolve it in the rest of this tutorial.
The steps are:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ When you access the web, quite a lot happens between your first interaction (for
2. When that file is received by the browser, it will start to parse it, and will probably find instructions to make more requests. As discussed above, these might be for files to embed such as images, style information, scripts, and so on.
4. When all of the resources have been requested, the web browser parses and renders them as required, before displaying the result to the user.

This description of how the web works is heavily simplified, but it is all you really need to know at this point. You will find a more detailed account of how web pages and requested and rendered by a web browser in our [Web standards](/en-US/docs/Learn_web_development/Getting_started/Web_standards) module, slightly later on.
This description of how the web works is heavily simplified, but it is all you really need to know at this point. You will find a more detailed account of how web pages are requested and rendered by a web browser in our [Web standards](/en-US/docs/Learn_web_development/Getting_started/Web_standards) module, slightly later on.

For now, try opening a web browser and loading up a couple of your favorite sites, thinking about the above steps as you do so.

Expand Down Expand Up @@ -208,7 +208,7 @@ As a result, you need to be careful to check the answers they give you, and not

- Typing in `"ant fish cheese"` (with the quotes) will only return results that contain that exact phrase.
- `"ant cheese" -fish` will return results that contain `ant` and/or `cheese` but not `fish`.
- `and OR cheese` will only return results with one term or the other, not both. From our testing, this one only seemed to work effectively in Google.
- `ant OR cheese` will only return results with one term or the other, not both. From our testing, this one only seemed to work effectively in Google.
- `intitle:cheese` will only return results that have "cheese" in the main title of the page.

> [!NOTE]
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/mozilla/firefox/releases/61/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ _No changes._

- CSS parsing has been parallelized ([Firefox bug 1346988](https://bugzil.la/1346988)).
- Support for {{cssxref("font-variation-settings")}} and {{cssxref("font-optical-sizing")}} has been enabled by default ([Firefox bug 1447163](https://bugzil.la/1447163)).
- The `grid-gap`, `grid-row-gap`, and `grid-column-gap` properties have been renamed to {{cssxref("gap")}}, {{cssxref("row-gap")}}, and {{cssxref("column-gap")}}, as they are no longer grid-specific ([Firefox bug 1398482](https://bugzil.la/1398482)). See [Box alignment; Gaps between boxes](/en-US/docs/Web/CSS/CSS_box_alignment/box_alignment#gaps_between_boxes) for additional details. The old names have been kept as aliases for web compatibility purposes.
- The `grid-gap`, `grid-row-gap`, and `grid-column-gap` properties have been renamed to {{cssxref("gap")}}, {{cssxref("row-gap")}}, and {{cssxref("column-gap")}}, as they are no longer grid-specific ([Firefox bug 1398482](https://bugzil.la/1398482)). See [Box alignment; Gaps between boxes](/en-US/docs/Web/CSS/CSS_box_alignment/Box_alignment#gaps_between_boxes) for additional details. The old names have been kept as aliases for web compatibility purposes.
- The {{cssxref("flex-basis")}} `content` value is now supported ([Firefox bug 1105111](https://bugzil.la/1105111)).
- Percentage values of {{cssxref("column-gap")}} are now supported in [CSS multi-column layout](/en-US/docs/Web/CSS/CSS_multicol_layout) ([Firefox bug 1398537](https://bugzil.la/1398537)).
- The CSS {{cssxref(":host")}} pseudo-class is now supported; this selects a custom element from inside its shadow DOM ([Firefox bug 992245](https://bugzil.la/992245)).
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/cdatasection/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The only sequence which is not allowed within a CDATA section is the closing seq
of a CDATA section itself, `]]>`.

> [!NOTE]
> CDATA sections should not be used within HTML they are considered as comments and not displayed.
> CDATA sections should not be used within HTML. They are considered comments and are not displayed.
{{InheritanceDiagram}}

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/element/auxclick_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ A {{domxref("PointerEvent")}}. Inherits from {{domxref("MouseEvent")}}.
{{InheritanceDiagram("PointerEvent")}}

> [!NOTE]
> In earlier versions of the specification the event type for this event was a {{domxref("MouseEvent")}}, and this is still the type passed in Firefox and Safari.
> In earlier versions of the specification, the event type for this event was a {{domxref("MouseEvent")}}. Check [browser compatibility](#browser_compatibility) for more information.
## Event properties

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/element/click_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ A {{domxref("PointerEvent")}}. Inherits from {{domxref("MouseEvent")}}.
{{InheritanceDiagram("PointerEvent")}}

> [!NOTE]
> In earlier versions of the specification the event type for this event was a {{domxref("MouseEvent")}}, and this is still the type passed in Firefox and Safari.
> In earlier versions of the specification, the event type for this event was a {{domxref("MouseEvent")}}. Check [browser compatibility](#browser_compatibility) for more information.
## Event properties

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/element/contextmenu_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ A {{domxref("PointerEvent")}}. Inherits from {{domxref("MouseEvent")}}.
{{InheritanceDiagram("PointerEvent")}}

> [!NOTE]
> In earlier versions of the specification the event type for this event was a {{domxref("MouseEvent")}}, and this is still the type passed in Firefox and Safari.
> In earlier versions of the specification, the event type for this event was a {{domxref("MouseEvent")}}. Check [browser compatibility](#browser_compatibility) for more information.
## Event properties

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/request/credentials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ In the following snippet, we create a new request using the {{domxref("Request.R

```js
const request = new Request("flowers.jpg");
const request = request.request; // returns "same-origin" by default
const credentials = request.credentials; // returns "same-origin" by default
```

## Specifications
Expand Down
3 changes: 3 additions & 0 deletions files/en-us/web/api/rtcinboundrtpstreamstats/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ The statistics can be obtained by iterating the {{domxref("RTCStatsReport")}} re
- {{domxref("RTCInboundRtpStreamStats.lastPacketReceivedTimestamp", "lastPacketReceivedTimestamp")}}
- : A {{domxref("DOMHighResTimeStamp")}} indicating the time at which the last packet was received for this source.
The [`timestamp`](#timestamp) property, on the other hand, indicates the time at which the statistics object was generated.
- {{domxref("RTCInboundRtpStreamStats.mid", "mid")}}
- : A string that uniquely identifies the pairing of source and destination of the transceiver's stream.
This is the value of the corresponding {{domxref("RTCRtpTransceiver.mid")}} unless that is null, in which case the statistic property is not present.
- {{domxref("RTCInboundRtpStreamStats.nackCount", "nackCount")}}
- : An integer value indicating the total number of Negative ACKnowledgement (NACK) packets this receiver has sent.
- {{domxref("RTCInboundRtpStreamStats.packetsDuplicated", "packetsDuplicated")}}
Expand Down
24 changes: 24 additions & 0 deletions files/en-us/web/api/rtcinboundrtpstreamstats/mid/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: "RTCInboundRtpStreamStats: mid property"
short-title: mid
slug: Web/API/RTCInboundRtpStreamStats/mid
page-type: web-api-instance-property
browser-compat: api.RTCStatsReport.type_inbound-rtp.mid
---

{{APIRef("WebRTC")}}

The **`mid`** property of the {{domxref("RTCInboundRtpStreamStats")}} dictionary is a string that contains the media id negotiated between the local and remote peers.
This uniquely identifies the pairing of source and destination for the transceiver's stream.

## Value

The value of the corresponding {{domxref("RTCRtpTransceiver.mid")}}, unless that value is null, in which case this statistic property is not present.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
2 changes: 1 addition & 1 deletion files/en-us/web/api/url/pathname/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ browser-compat: api.URL.pathname
The **`pathname`** property of the {{domxref("URL")}} interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a `/` character.

HTTPS, HTTP, or other URLs with [hierarchical schemes](https://www.rfc-editor.org/rfc/rfc3986#section-1.2.3) (which the URL standard calls "[special schemes](https://url.spec.whatwg.org/#special-scheme)") always have at least one (invisible) path segment: the empty string.
The `pathname` value for such URLs will therefore always have a least one `/` character.
The `pathname` value for such URLs will therefore always have at least one `/` character.

For non-hierarchical schemes, if the URL has no path segments, the value of its `pathname` property will be the empty string.

Expand Down
16 changes: 8 additions & 8 deletions files/en-us/web/css/@font-face/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ The **`@font-face`** [CSS](/en-US/docs/Web/CSS) [at-rule](/en-US/docs/Web/CSS/At
- {{cssxref("@font-face/font-display", "font-display")}}
- : Determines how a font face is displayed based on whether and when it is downloaded and ready to use.
- {{cssxref("@font-face/font-family", "font-family")}}
- : Specifies a name that will be used as the font face value for font properties.
- : Specifies a name that will be used as the font face value for font properties. A `font-family` name is required for the `@font-face` rule to be valid.
- {{cssxref("@font-face/font-stretch", "font-stretch")}}
- : A {{cssxref("font-stretch")}} value. Accepts two values to specify a range that is supported by a font-face, for example `font-stretch: 50% 200%;`
- : A {{cssxref("font-stretch")}} value. Accepts two values to specify a range that is supported by a font face, for example `font-stretch: 50% 200%;`
- {{cssxref("@font-face/font-style", "font-style")}}
- : A {{cssxref("font-style")}} value. Accepts two values to specify a range that is supported by a font-face, for example `font-style: oblique 20deg 50deg;`
- : A {{cssxref("font-style")}} value. Accepts two values to specify a range that is supported by a font face, for example `font-style: oblique 20deg 50deg;`
- {{cssxref("@font-face/font-weight", "font-weight")}}
- : A {{cssxref("font-weight")}} value. Accepts two values to specify a range that is supported by a font-face, for example `font-weight: 100 400;`
- : A {{cssxref("font-weight")}} value. Accepts two values to specify a range that is supported by a font face, for example `font-weight: 100 400;`
- {{cssxref("@font-face/font-feature-settings", "font-feature-settings")}}
- : Allows control over advanced typographic features in OpenType fonts.
- {{cssxref("@font-face/font-variation-settings", "font-variation-settings")}}
- : Allows low-level control over OpenType or TrueType font variations, by specifying the four letter axis names of the features to vary, along with their variation values.
- : Allows low-level control over OpenType or TrueType font variations, by specifying the four-letter axis names of the features to vary, along with their variation values.
- {{cssxref("@font-face/line-gap-override", "line-gap-override")}}
- : Defines the line gap metric for the font.
- {{cssxref("@font-face/size-adjust", "size-adjust")}}
- : Defines a multiplier for glyph outlines and metrics associated with this font. This makes it easier to harmonize the designs of various fonts when rendered at the same font size.
- {{cssxref("@font-face/src", "src")}}
- : Specifies references to font resources including hints about the font format and technology. It is required for the @font-face rule to be valid.
- : Specifies references to font resources including hints about the font format and technology. A `src` is required for the `@font-face` rule to be valid.
- {{cssxref("@font-face/unicode-range", "unicode-range")}}
- : The range of Unicode code points to be used from the font.

Expand All @@ -58,9 +58,9 @@ It's common to use both `url()` and `local()` together, so that the user's insta
If the `local()` function is provided, specifying a font name to look for on the user's device, and if the {{Glossary("user agent")}} finds a match, that local font is used. Otherwise, the font resource specified using the `url()` function is downloaded and used.

Browsers attempt to load resources in their list declaration order, so usually `local()` should be written before `url()`. Both functions are optional, so a rule block containing only one or more `local()` without `url()` is possible.
If a more specific fonts with `format()` or `tech()` values are desired, these should be listed _before_ versions that don't have these values, as the less-specific variant would otherwise be tried and used first.
If more specific fonts with `format()` or `tech()` values are desired, these should be listed _before_ versions that don't have these values, as the less specific variant would otherwise be tried and used first.

By allowing authors to provide their own fonts, `@font-face` makes it possible to design content without being limited to the so-called "web-safe" fonts (that is, the fonts which are so common that they're considered to be universally available). The ability to specify the name of a locally-installed font to look for and use makes it possible to customize the font beyond the basics while making it possible to do so without relying on an internet connection.
By allowing authors to provide their own fonts, `@font-face` makes it possible to design content without being limited to the so-called "web-safe" fonts (that is, the fonts that are so common that they're considered to be universally available). The ability to specify the name of a locally-installed font to look for and use makes it possible to customize the font beyond the basics while making it possible to do so without relying on an internet connection.

> [!NOTE]
> Fallback strategies for loading fonts on older browsers are described in the [`src` descriptor page](/en-US/docs/Web/CSS/@font-face/src#specifying_fallbacks_for_older_browsers).
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/css/backdrop-filter/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ backdrop-filter: unset;

- `none`
- : No filter is applied to the backdrop.
- `<filter-function-list>`
- `<filter-value-list>`
- : A space-separated list of {{cssxref("&lt;filter-function&gt;")}}s or an [SVG filter](/en-US/docs/Web/SVG/Element/filter) that will be applied to the backdrop. CSS `<filter-function>`s include {{CSSxRef("filter-function/blur", "blur()")}}, {{CSSxRef("filter-function/brightness", "brightness()")}}, {{CSSxRef("filter-function/contrast", "contrast()")}}, {{CSSxRef("filter-function/drop-shadow", "drop-shadow()")}}, {{CSSxRef("filter-function/grayscale", "grayscale()")}}, {{CSSxRef("filter-function/hue-rotate", "hue-rotate()")}}, {{CSSxRef("filter-function/invert", "invert()")}}, {{CSSxRef("filter-function/opacity", "opacity()")}}, {{CSSxRef("filter-function/saturate", "saturate()")}}, and {{CSSxRef("filter-function/sepia", "sepia()")}}.

## Formal definition
Expand Down
Loading

0 comments on commit afc941f

Please sign in to comment.