Skip to content

Commit

Permalink
Merge branch 'main' into code-language/2
Browse files Browse the repository at this point in the history
  • Loading branch information
queengooborg committed Jul 24, 2023
2 parents e5401e4 + 6d60617 commit c5c2fc3
Show file tree
Hide file tree
Showing 131 changed files with 229 additions and 178 deletions.
2 changes: 1 addition & 1 deletion files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9616,7 +9616,7 @@
/en-US/docs/Web/API/Screen.unlockOrientation /en-US/docs/Web/API/Screen/unlockOrientation
/en-US/docs/Web/API/Screen.width /en-US/docs/Web/API/Screen/width
/en-US/docs/Web/API/Screen/onorientationchange /en-US/docs/Web/API/Screen/orientationchange_event
/en-US/docs/Web/API/ScreenOrientation/onchange /en-US/docs/Web/API/ScreenOrientation
/en-US/docs/Web/API/ScreenOrientation/onchange /en-US/docs/Web/API/ScreenOrientation/change_event
/en-US/docs/Web/API/ScriptProcessorNode.bufferSize /en-US/docs/Web/API/ScriptProcessorNode/bufferSize
/en-US/docs/Web/API/ScriptProcessorNode.onaudioprocess /en-US/docs/Web/API/ScriptProcessorNode/audioprocess_event
/en-US/docs/Web/API/ScriptProcessorNode/audioprocess /en-US/docs/Web/API/ScriptProcessorNode/audioprocess_event
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/glossary/dns/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ page-type: glossary-definition

**DNS** (Domain Name System) is a hierarchical and decentralized naming system for Internet connected resources. DNS maintains a list of {{Glossary("domain name","domain names")}} along with the resources, such as IP addresses, that are associated with them.

The most prominent function of DNS is the translation of human-friendly domain names (such as mozilla.org) to a numeric {{Glossary("IP address")}} (such as 151.106.5.172); this process of mapping a domain name to the appropriate IP address is known as a **DNS lookup**. By contrast, a **reverse DNS lookup** (rDNS) is used to determine the domain name associated with an IP address.
The most prominent function of DNS is the translation of human-friendly domain names (such as mozilla.org) to a numeric {{Glossary("IP address")}} (such as 192.0.2.172); this process of mapping a domain name to the appropriate IP address is known as a **DNS lookup**. By contrast, a **reverse DNS lookup** (rDNS) is used to determine the domain name associated with an IP address.

## See also

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ So we are connected to the telephone infrastructure. The next step is to send th

### Finding computers

If you want to send a message to a computer, you have to specify which one. Thus any computer linked to a network has a unique address that identifies it, called an "IP address" (where IP stands for _Internet Protocol_). It's an address made of a series of four numbers separated by dots, for example: `192.168.2.10`.
If you want to send a message to a computer, you have to specify which one. Thus any computer linked to a network has a unique address that identifies it, called an "IP address" (where IP stands for _Internet Protocol_). It's an address made of a series of four numbers separated by dots, for example: `192.0.2.172`.

That's perfectly fine for computers, but we human beings have a hard time remembering that sort of address. To make things easier, we can alias an IP address with a human-readable name called a _domain name_. For example (at the time of writing; IP addresses can change) `google.com` is the domain name used on top of the IP address `142.250.190.78`. So using the domain name is the easiest way for us to reach a computer over the Internet.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ page-type: learn-faq

Domain names are a key part of the Internet infrastructure. They provide a human-readable address for any web server available on the Internet.

Any Internet-connected computer can be reached through a public {{Glossary("IP Address")}}, either an IPv4 address (e.g. `173.194.121.32`) or an IPv6 address (e.g., `2027:0da8:8b73:0000:0000:8a2e:0370:1337`).
Any Internet-connected computer can be reached through a public {{Glossary("IP Address")}}, either an IPv4 address (e.g. `192.0.2.172`) or an IPv6 address (e.g., `2001:db8:8b73:0000:0000:8a2e:0370:1337`).

Computers can handle such addresses easily, but people have a hard time finding out who is running the server or what service the website offers. IP addresses are hard to remember and might change over time.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ When browsers send requests to servers for HTML files, those HTML files often co

## DNS explained

Real web addresses aren't the nice, memorable strings you type into your address bar to find your favorite websites. They are special numbers that look like this: `63.245.215.20`.
Real web addresses aren't the nice, memorable strings you type into your address bar to find your favorite websites. They are special numbers that look like this: `192.0.2.172`.

This is called an {{Glossary("IP Address", "IP address")}}, and it represents a unique location on the web. However, it's not very easy to remember, is it? That's why the Domain Name System was invented. This system uses special servers that match up a web address you type into your browser (like "mozilla.org") to the website's real (IP) address.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function resolved(record) {
let resolving = browser.dns.resolve("example.com");
resolving.then(resolved);

// > e.g. Array [ "73.284.240.12" ]
// > e.g. Array [ "192.0.2.172" ]
```

Bypass the cache, and ask for the canonical name:
Expand All @@ -82,7 +82,7 @@ let resolving = browser.dns.resolve("developer.mozilla.org", [
resolving.then(resolved);

// > e.g. xyz.us-west-2.elb.amazonaws.com
// > e.g. Array [ "78.18.187.134", "34.79.135.234" ]
// > e.g. Array [ "192.0.2.172", "198.51.100.45" ]
```

{{WebExtExamples}}
2 changes: 2 additions & 0 deletions files/en-us/mozilla/firefox/releases/116/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ This article provides information about the changes in Firefox 116 that affect d

### SVG

- The `q` [length unit](/en-US/docs/Web/SVG/Content_type#length) (`1q = 1/40th of 1cm`) is now supported ([Firefox bug 1836995](https://bugzil.la/1836995)).

#### Removals

### HTTP
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/rtcicecandidate/address/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ left out of the pool of candidates, as are any other candidates which aren't rel
Consider this {{Glossary("SDP")}} attribute line (a-line) which describes an ICE candidate:

```plain
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

The fifth field, `"192.168.0.56"` is the IP address in this candidate's a-line string.
The fifth field, `"192.0.2.172"` is the IP address in this candidate's a-line string.

## Examples

Expand Down
6 changes: 3 additions & 3 deletions files/en-us/web/api/rtcicecandidate/candidate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ If the `candidate` is an empty string (`""`), the end of the candidate list has
The syntax of the candidate string is described in {{RFC(5245, "", 15.1)}}. For an a-line (attribute line) that looks like this:

```plain
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

the corresponding `candidate` string's value will be: `"candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host"`.
the corresponding `candidate` string's value will be: `"candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host"`.

The {{Glossary("user agent")}} always prefers candidates with the highest
{{domxref("RTCIceCandidate.priority", "priority")}}, all else being equal. In the
Expand All @@ -37,7 +37,7 @@ attributes for this example candidate is:
- {{domxref("RTCIceCandidate.component", "component")}} = `"rtp"` (the number 1 is encoded to this string; 2 becomes `"rtcp"`)
- {{domxref("RTCIceCandidate.protocol", "protocol")}} = `"udp"`
- {{domxref("RTCIceCandidate.priority", "priority")}} = 2043278322
- {{domxref("RTCIceCandidate/address", "ip")}} = `"192.168.0.56"`
- {{domxref("RTCIceCandidate/address", "ip")}} = `"192.0.2.172"`
- {{domxref("RTCIceCandidate.port", "port")}} = 44323
- {{domxref("RTCIceCandidate.type", "type")}} = `"host"`

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/rtcicecandidate/component/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ A string which is one of the following:
Consider this {{Glossary("SDP")}} attribute line (a-line):

```plain
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

This is an ICE candidate a-line, whose {{domxref("RTCIceCandidate.foundation",
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/rtcicecandidate/foundation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Consider this {{Glossary("SDP")}} attribute line (a-line) which describes an ICE
candidate:

```plain
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

The field `"4234997325"` is the foundation.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/rtcicecandidate/port/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Consider this {{Glossary("SDP")}} attribute line (a-line) which describes an ICE
candidate:

```plain
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

The port number is found in the sixth field, which is `"44323"`. In this case, the value of `port` will be 44323.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/rtcicecandidate/priority/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The larger this value is, the more preferable the remote peer considers this can
Consider this {{Glossary("SDP")}} attribute line (a-line) which describes an ICE candidate:

```plain
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

The priority is the number after the protocol, so it's the fourth field in the candidate string.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/rtcicecandidate/protocol/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ A string that indicates what network protocol the candidate uses:
Here's an example candidate a-line from an ICE transaction:

```plain
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

The third field, `"udp"`, is the protocol type, indicating that the
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/rtcicecandidate/relatedaddress/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ addresses. `relatedAddress` can also be used by Quality-of-Service (QoS) mechani
Here's an [SDP](/en-US/docs/Web/API/WebRTC_API/Protocols#sdp) attribute line (a-line) describing an ICE candidate discovered by the STUN server:

```plain
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 6502 typ srflx raddr 192.168.2.77 rport 32768 generation 0
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 6502 typ srflx raddr 198.51.100.45 rport 32768 generation 0
```

The remote address, `relatedAddress`, is the dotted quad (for IPv4) or
colon-delineated 64-bit address (for IPv6) immediately following the text `"raddr"`, or `"192.168.2.77"`.
colon-delineated 64-bit address (for IPv6) immediately following the text `"raddr"`, or `"198.51.100.45"`.

## Examples

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/rtcicecandidate/relatedport/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Here's an {{Glossary("SDP")}} attribute line (a-line) describing an ICE candidat
discovered by the STUN server:

```plain
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 6502 typ srflx raddr 192.168.2.77 rport 32768 generation 0
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 6502 typ srflx raddr 198.51.100.45 rport 32768 generation 0
```

The remote port, `relatedPort`, is the number immediately following the `"rport"` label on the a-line, or 32768.
Expand Down
6 changes: 3 additions & 3 deletions files/en-us/web/api/rtcicecandidate/rtcicecandidate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ new RTCIceCandidate(candidateInfo)
For an a-line (attribute line) that looks like this:

```plain
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

the corresponding `candidate` string's value will be
`"candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host"`.
`"candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host"`.

The {{Glossary("user agent")}} always prefers candidates with the highest {{domxref("RTCIceCandidate.priority", "priority")}}, all else being equal.
In the example above, the priority is `2043278322`. The attributes are all separated by a single space character, and are in a specific order.
Expand All @@ -53,7 +53,7 @@ new RTCIceCandidate(candidateInfo)
- {{domxref("RTCIceCandidate.component", "component")}} = `"rtp"` (the number 1 is encoded to this string; 2 becomes `"rtcp"`)
- {{domxref("RTCIceCandidate.protocol", "protocol")}} = `"udp"`
- {{domxref("RTCIceCandidate.priority", "priority")}} = 2043278322
- {{domxref("RTCIceCandidate/address", "ip")}} = `"192.168.0.56"`
- {{domxref("RTCIceCandidate/address", "ip")}} = `"192.0.2.172"`
- {{domxref("RTCIceCandidate.port", "port")}} = 44323
- {{domxref("RTCIceCandidate.type", "type")}} = `"host"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ addIceCandidate(candidate, successCallback, failureCallback) // deprecated
For an a-line (attribute line) that looks like this:

```plain
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

the corresponding `candidate` string's value will be
`"candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host"`.
`"candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host"`.

The {{Glossary("user agent")}} always prefers candidates with the highest {{domxref("RTCIceCandidate.priority", "priority")}}, all else being equal.
In the example above, the priority is `2043278322`. The attributes are all separated by a single space character, and are in a specific order.
Expand All @@ -61,7 +61,7 @@ addIceCandidate(candidate, successCallback, failureCallback) // deprecated
- {{domxref("RTCIceCandidate.component", "component")}} = `"rtp"` (the number 1 is encoded to this string; 2 becomes `"rtcp"`)
- {{domxref("RTCIceCandidate.protocol", "protocol")}} = `"udp"`
- {{domxref("RTCIceCandidate.priority", "priority")}} = 2043278322
- {{domxref("RTCIceCandidate/address", "ip")}} = `"192.168.0.56"`
- {{domxref("RTCIceCandidate/address", "ip")}} = `"192.0.2.172"`
- {{domxref("RTCIceCandidate.port", "port")}} = 44323
- {{domxref("RTCIceCandidate.type", "type")}} = `"host"`

Expand Down Expand Up @@ -170,7 +170,7 @@ signalingChannel.onmessage = (receivedString) => {
if (message.ice) {
// A typical value of ice here might look something like this:
//
// {candidate: "candidate:0 1 UDP 2122154243 192.168.1.9 53421 typ host", sdpMid: "0", …}
// {candidate: "candidate:0 1 UDP 2122154243 192.0.2.43 53421 typ host", sdpMid: "0", …}
//
// Pass the whole thing to addIceCandidate:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ A generic {{domxref("Event")}}.

This feature is not part of any specification. It is no longer on track to becoming a standard.

Use {{domxref("ScreenOrientation.onchange")}} instead.
Use the {{domxref("ScreenOrientation.change_event", "ScreenOrientation change event")}} instead.

## Browser compatibility

Expand Down
45 changes: 45 additions & 0 deletions files/en-us/web/api/screenorientation/change_event/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: "ScreenOrientation: change event"
short-title: change
slug: Web/API/ScreenOrientation/change_event
page-type: web-api-event
browser-compat: api.ScreenOrientation.change_event
---

{{APIRef("Screen Orientation API")}}

The **`change`** event of the {{domxref("ScreenOrientation")}} interface fires when the orientation of the screen has changed, for example when a user rotates their mobile phone.

## Syntax

Use the event name in methods like {{domxref("EventTarget.addEventListener", "addEventListener()")}}, or set an event handler property.

```js
addEventListener("change", (event) => {});

onchange = (event) => {};
```

## Event type

A generic {{domxref("Event")}}.

## Example

In the following example, the `change` callback prints the new {{DOMxRef("ScreenOrientation.type", "screen orientation type", "", "nocode")}} and {{DOMxRef("ScreenOrientation.angle", "angle", "", "nocode")}}.

```js
screen.orientation.addEventListener("change", (event) => {
const type = event.target.type;
const angle = event.target.angle;
console.log(`ScreenOrientation change: ${type}, ${angle} degrees.`);
});
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
20 changes: 17 additions & 3 deletions files/en-us/web/api/screenorientation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ A **`ScreenOrientation`** instance object can be retrieved using the {{domxref("
- {{DOMxRef("ScreenOrientation.angle")}} {{ReadOnlyInline}}
- : Returns the document's current orientation angle.

### Event handlers
## Events

- {{DOMxRef("ScreenOrientation.onchange")}}
- : The [event handler](/en-US/docs/Web/Events/Event_handlers) called whenever the screen changes orientation.
Listen to these events using `addEventListener()` or by assigning an event listener to the `oneventname` property of this interface.

- {{DOMxRef("ScreenOrientation.change_event", "change")}}
- : Fired whenever the screen changes orientation.

## Instance methods

Expand All @@ -32,6 +34,18 @@ A **`ScreenOrientation`** instance object can be retrieved using the {{domxref("
- {{DOMxRef("ScreenOrientation.unlock()")}}
- : Unlocks the orientation of the containing document from its default orientation.

## Example

In the following example, we listen for an orientation {{DOMxRef("ScreenOrientation.change_event", "change")}} event and log the new {{DOMxRef("ScreenOrientation.type", "screen orientation type", "", "nocode")}} and {{DOMxRef("ScreenOrientation.angle", "angle", "", "nocode")}}.

```js
screen.orientation.addEventListener("change", (event) => {
const type = event.target.type;
const angle = event.target.angle;
console.log(`ScreenOrientation change: ${type}, ${angle} degrees.`);
});
```

## Specifications

{{Specifications}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The `orientationchange` event is fired when the orientation of the device has ch

This event is not cancelable and does not bubble.

This event is deprecated. Listen for the {{domxref("ScreenOrientation/onchange", "ScreenOrientation.onchange")}} event instead.
This event is deprecated. Listen for the {{domxref("ScreenOrientation.change_event", "change")}} event of the {{domxref("ScreenOrientation")}} interface instead.

## Syntax

Expand Down
14 changes: 5 additions & 9 deletions files/en-us/web/html/global_attributes/itemprop/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ When a string value can't be easily read and understood by a person (e.g., a lon

### An item with a property whose value is a product ID

The ID is not human-friendly, so the product's name is used the human-visible text instead of the ID.
The ID is not human-friendly, so the product's name is used instead.

```html
<h1 itemscope>
Expand Down Expand Up @@ -152,7 +152,7 @@ The outer item above has two properties, "name" and "band". The "name" is "Amand

### All the properties separated from their items

This example is the same as the previous one, but all the properties are separated from their items
This example is the same as the previous one, but all the properties are separated from their items.

```html
<div itemscope id="amanda" itemref="a b"></div>
Expand Down Expand Up @@ -292,7 +292,7 @@ The property value of a name-value pair is as given for the first matching case

- If the element has an `itemscope` attribute

- The value is the **item** created by the element.
- The value is the **item** created by the element

- If the element is a `meta` element

Expand Down Expand Up @@ -332,7 +332,7 @@ If a property's value is a `URL`, the property must be specified using a URL pro

Names are unordered relative to each other, but if a particular name has multiple values, they do have a relative order.

In the following example, the "a" property has the values "1" and "2", _in that order_, but whether the "a" property comes before the "b" property or not is not important
In the following example, the "a" property has the values "1" and "2", _in that order_, but whether the "a" property comes before the "b" property or not is not important.

```html
<div itemscope>
Expand All @@ -342,7 +342,7 @@ In the following example, the "a" property has the values "1" and "2", _in that
</div>
```

The following is equivalent
Here are several equivalent examples:

```html
<div itemscope>
Expand All @@ -352,8 +352,6 @@ The following is equivalent
</div>
```

As is the following

```html
<div itemscope>
<p itemprop="a">1</p>
Expand All @@ -362,8 +360,6 @@ As is the following
</div>
```

And the following

```html
<div id="x">
<p itemprop="a">1</p>
Expand Down
Loading

0 comments on commit c5c2fc3

Please sign in to comment.