Skip to content
17 changes: 14 additions & 3 deletions files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16886,11 +16886,22 @@
/en-US/docs/WebAssembly/Reference/Numeric/Population_count /en-US/docs/WebAssembly/Reference/Numeric/popcnt
/en-US/docs/WebAssembly/Reference/Numeric/Remainder /en-US/docs/WebAssembly/Reference/Numeric/rem
/en-US/docs/WebAssembly/Reference/Numeric/Right_rotate /en-US/docs/WebAssembly/Reference/Numeric/rotr
/en-US/docs/WebAssembly/Reference/Numeric/Right_shift /en-US/docs/WebAssembly/Reference/Numeric/shr
/en-US/docs/WebAssembly/Reference/Numeric/Right_shift /en-US/docs/WebAssembly/Reference/Numeric/shr_s
/en-US/docs/WebAssembly/Reference/Numeric/Square_root /en-US/docs/WebAssembly/Reference/Numeric/sqrt
/en-US/docs/WebAssembly/Reference/Numeric/Subtraction /en-US/docs/WebAssembly/Reference/Numeric/sub
/en-US/docs/WebAssembly/Reference/Numeric/Truncate_float_to_float /en-US/docs/WebAssembly/Reference/Numeric/trunc_float
/en-US/docs/WebAssembly/Reference/Numeric/Truncate_float_to_int /en-US/docs/WebAssembly/Reference/Numeric/trunc_int
/en-US/docs/WebAssembly/Reference/Numeric/Truncate_float_to_float /en-US/docs/WebAssembly/Reference/Numeric/trunc
/en-US/docs/WebAssembly/Reference/Numeric/Truncate_float_to_int /en-US/docs/WebAssembly/Reference/Numeric/trunc_f32_s
/en-US/docs/WebAssembly/Reference/Numeric/promote /en-US/docs/WebAssembly/Reference/Numeric/promote_32
/en-US/docs/WebAssembly/Reference/Numeric/shr /en-US/docs/WebAssembly/Reference/Numeric/shr_s
/en-US/docs/WebAssembly/Reference/Numeric/trunc_float /en-US/docs/WebAssembly/Reference/Numeric/trunc
/en-US/docs/WebAssembly/Reference/Numeric/trunc_int /en-US/docs/WebAssembly/Reference/Numeric/trunc_f32_s
/en-US/docs/WebAssembly/Reference/Numeric/wrap /en-US/docs/WebAssembly/Reference/Numeric/wrap_i64
/en-US/docs/WebAssembly/Reference/SIMD/bitwise/shl /en-US/docs/WebAssembly/Reference/Numeric/shl
/en-US/docs/WebAssembly/Reference/SIMD/bitwise/shr_s /en-US/docs/WebAssembly/Reference/Numeric/shr_s
/en-US/docs/WebAssembly/Reference/SIMD/bitwise/shr_u /en-US/docs/WebAssembly/Reference/Numeric/shr_u
/en-US/docs/WebAssembly/Reference/SIMD/conversion/ceil /en-US/docs/WebAssembly/Reference/Numeric/ceil
/en-US/docs/WebAssembly/Reference/SIMD/conversion/floor /en-US/docs/WebAssembly/Reference/Numeric/floor
/en-US/docs/WebAssembly/Reference/SIMD/conversion/trunc /en-US/docs/WebAssembly/Reference/Numeric/trunc
/en-US/docs/WebAssembly/Reference/Variables/Local_get /en-US/docs/WebAssembly/Reference/Variables/local.get
/en-US/docs/WebAssembly/Reference/Variables/Local_set /en-US/docs/WebAssembly/Reference/Variables/local.set
/en-US/docs/WebAssembly/Reference/Variables/Local_tee /en-US/docs/WebAssembly/Reference/Variables/local.tee
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ Servers should use `text/javascript` for JavaScript resources as indicated in th
# Manifest files
AddType application/manifest+json webmanifest
AddType application/x-web-app-manifest+json webapp
AddType text/cache-manifest appcache
# Media files
AddType audio/mp4 f4a f4b m4a
AddType audio/ogg oga ogg opus
Expand Down Expand Up @@ -237,7 +236,7 @@ Serve the following file types with the `charset` parameter set to `UTF-8` using

```apacheconf
<IfModule mod_mime.c>
AddCharset utf-8 .appcache \
AddCharset utf-8 \
.bbaw \
.css \
.htc \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ This section lists `page-type` values for pages under [WebAssembly/](/en-US/docs
- `webassembly-instance-property`: an instance property, like [`WebAssembly.Instance.exports`](/en-US/docs/WebAssembly/Reference/JavaScript_interface/Instance/exports).
- `webassembly-instance-method`: an instance method, like [`WebAssembly.Exception.getArg()`](/en-US/docs/WebAssembly/Reference/JavaScript_interface/Exception/getArg).
- `webassembly-static-method`: a static method, like [`WebAssembly.Module.exports()`](/en-US/docs/WebAssembly/Reference/JavaScript_interface/Module/exports_static).
- `webassembly-instruction`: an instruction, or a set of instructions, like [`wrap`](/en-US/docs/WebAssembly/Reference/Numeric/wrap).
- `webassembly-instruction`: an instruction, or a set of instructions, like [`wrap`](/en-US/docs/WebAssembly/Reference/Numeric/wrap_i64).

### WebDriver page types

Expand Down
3 changes: 3 additions & 0 deletions files/en-us/mozilla/firefox/releases/150/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ Firefox 150 is the current [Beta version of Firefox](https://www.firefox.com/en-

### APIs

- The {{domxref("Sanitizer.replaceElementWithChildren()")}} method will now return `false` if the element to be replaced is {{htmlelement("html")}} in the HTML [namespace](/en-US/docs/Web/API/Sanitizer/replaceElementWithChildren#namespace).
In other words, you can't use this method to create a {{domxref("Sanitizer")}} that will replace the `<html>` element with its inner content. ([Firefox bug 2022176](https://bugzil.la/2022176)).

#### DOM

- The [`options.shadowRoots`](/en-US/docs/Web/API/Document/caretPositionFromPoint#shadowroots) argument of the {{domxref('Document.caretPositionFromPoint()')}} method is now supported.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/abortsignal/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ try {
console.error("Timeout: It took more than 5 seconds to get the result!");
} else if (err.name === "AbortError") {
console.error(
"Fetch aborted by user action (browser stop button, closing tab, etc.",
"Fetch aborted by user action (browser stop button, closing tab, etc.)",
);
} else {
// A network error, or some other problem.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/client/postmessage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ postMessage(message, options)
> A service worker is not in the same [agent cluster](/en-US/docs/Web/JavaScript/Reference/Execution_model#agent_clusters_and_memory_sharing) as its client, and therefore cannot share memory. {{jsxref("SharedArrayBuffer")}} objects, or buffer views backed by one, cannot be posted across agent clusters. Trying to do so will generate a {{domxref("BroadcastChannel/messageerror_event", "messageerror")}} event containing a `DataCloneError` {{domxref("DOMException")}} on the receiving end.

- `transfer` {{optional_inline}}
- : An optional [array](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) of [transferable objects](/en-US/docs/Web/API/Web_Workers_API/Transferable_objects) to transfer ownership of. The ownership of these objects is given to the destination side and they are no longer usable on the sending side. These transferable objects should be attached to the message; otherwise they would be moved but not actually accessible on the receiving end.
- : An optional [array](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) of [transferable objects](/en-US/docs/Web/API/Web_Workers_API/Transferable_objects) to transfer ownership of. The ownership of these objects is given to the destination side and they are no longer usable on the sending side. These transferable objects are not automatically sent; they must either be contained in the message or be accessible to the recipient via other means, such as {{domxref("MessagePort")}} via {{domxref("MessageEvent.ports")}}.
- `options` {{optional_inline}}
- : An optional object containing the following properties:
- `transfer` {{optional_inline}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ postMessage(message, options)
This may be any value or JavaScript object handled by the [structured clone](/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm) algorithm, which includes cyclical references.

- `transfer` {{optional_inline}}
- : An optional [array](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) of [transferable objects](/en-US/docs/Web/API/Web_Workers_API/Transferable_objects) to transfer ownership of. The ownership of these objects is given to the destination side and they are no longer usable on the sending side. These transferable objects should be attached to the message; otherwise they would be moved but not actually accessible on the receiving end.
- : An optional [array](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) of [transferable objects](/en-US/docs/Web/API/Web_Workers_API/Transferable_objects) to transfer ownership of. The ownership of these objects is given to the destination side and they are no longer usable on the sending side. These transferable objects are not automatically sent; they must either be contained in the message or be accessible to the recipient via other means, such as {{domxref("MessagePort")}} via {{domxref("MessageEvent.ports")}}.
- `options` {{optional_inline}}
- : An optional object containing the following properties:
- `transfer` {{optional_inline}}
Expand Down
10 changes: 5 additions & 5 deletions files/en-us/web/api/gamepad_api/using_the_gamepad_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ const gamepads = {};

function gamepadHandler(event, connected) {
const gamepad = event.gamepad;
// Note:
// gamepad === navigator.getGamepads()[gamepad.index]
// Note: Use gamepad.index as the stable key, then read the latest
// state from navigator.getGamepads() inside your update loop.

if (connected) {
gamepads[gamepad.index] = gamepad;
Expand All @@ -73,11 +73,11 @@ window.addEventListener("gamepaddisconnected", (e) => {
});
```

This previous example also demonstrates how the `gamepad` property can be held after the event has completed — a technique we will use for device state querying later.
This previous example shows how to keep track of which devices are connected by `index`. For current button and axis state, call {{domxref("Navigator.getGamepads()")}} each frame and read the latest object for that `index`.

## Querying the Gamepad object

As you can see, the **gamepad** events discussed above include a `gamepad` property on the event object, which returns a {{ domxref("Gamepad") }} object. We can use this in order to determine which gamepad (i.e., its ID) had caused the event, since multiple gamepads might be connected at once. We can do much more with the {{ domxref("Gamepad") }} object, including holding a reference to it and querying it to find out which buttons and axes are being pressed at any one time. Doing so is often desirable for games or other interactive web pages that need to know the state of a gamepad now vs. the next time an event fires.
As you can see, the **gamepad** events discussed above include a `gamepad` property on the event object, which returns a {{ domxref("Gamepad") }} object. We can use this to determine which gamepad (i.e., its ID) had caused the event, since multiple gamepads might be connected at once. To read the current button and axis state, use the gamepad's `index` and fetch the latest object from {{ domxref("Navigator.getGamepads()") }} in your animation loop.

Performing such checks tends to involve using the {{ domxref("Gamepad") }} object in conjunction with an animation loop (e.g., {{ domxref("Window.requestAnimationFrame","requestAnimationFrame") }}), where developers want to make decisions for the current frame based on the state of the gamepad or gamepads.

Expand Down Expand Up @@ -110,7 +110,7 @@ The {{ domxref("Gamepad") }} object's properties are as follows:
- `timestamp`: This returns a {{ domxref("DOMHighResTimeStamp") }} representing the last time the data for this gamepad was updated, allowing developers to determine if the `axes` and `button` data have been updated from the hardware. The value must be relative to the `navigationStart` attribute of the {{ domxref("PerformanceTiming") }} interface. Values are monotonically increasing, meaning that they can be compared to determine the ordering of updates, as newer values will always be greater than or equal to older values. Note that this property is not currently supported in Firefox.

> [!NOTE]
> The Gamepad object is available on the {{ domxref("Window/gamepadconnected_event", "gamepadconnected") }} event rather than the {{ domxref("Window") }} object itself, for security reasons. Once we have a reference to it, we can query its properties for information about the current state of the gamepad. Behind the scenes, this object will be updated every time the gamepad's state changes.
> The Gamepad object is available on the {{ domxref("Window/gamepadconnected_event", "gamepadconnected") }} event rather than the {{ domxref("Window") }} object itself, for security reasons. You can also access gamepads through {{domxref("Navigator.getGamepads()")}}. In practice, you should poll {{domxref("Navigator.getGamepads()")}} and read the current object for a known `index` each frame, rather than relying on a long-lived reference from an earlier event.

### Using button information

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/messageport/postmessage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ postMessage(message, options)
> Execution contexts that can message each other may not be in the same [agent cluster](/en-US/docs/Web/JavaScript/Reference/Execution_model#agent_clusters_and_memory_sharing), and therefore cannot share memory. {{jsxref("SharedArrayBuffer")}} objects, or buffer views backed by one, cannot be posted across agent clusters. Trying to do so will generate a {{domxref("BroadcastChannel/messageerror_event", "messageerror")}} event containing a `DataCloneError` {{domxref("DOMException")}} on the receiving end.

- `transfer` {{optional_inline}}
- : An optional [array](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) of [transferable objects](/en-US/docs/Web/API/Web_Workers_API/Transferable_objects) to transfer ownership of. The ownership of these objects is given to the destination side and they are no longer usable on the sending side. These transferable objects should be attached to the message; otherwise they would be moved but not actually accessible on the receiving end.
- : An optional [array](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) of [transferable objects](/en-US/docs/Web/API/Web_Workers_API/Transferable_objects) to transfer ownership of. The ownership of these objects is given to the destination side and they are no longer usable on the sending side. These transferable objects are not automatically sent; they must either be contained in the message or be accessible to the recipient via other means, such as {{domxref("MessagePort")}} via {{domxref("MessageEvent.ports")}}.
- `options` {{optional_inline}}
- : An optional object containing the following properties:
- `transfer` {{optional_inline}}
Expand Down
54 changes: 54 additions & 0 deletions files/en-us/web/api/rtcidentityassertion/idp/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: "RTCIdentityAssertion: idp property"
short-title: idp
slug: Web/API/RTCIdentityAssertion/idp
page-type: web-api-instance-property
status:
- experimental
browser-compat: api.RTCIdentityAssertion.idp
---

{{APIRef("WebRTC")}}{{SeeCompatTable}}

The **`idp`** property of the {{domxref("RTCIdentityAssertion")}} interface indicates the domain name of the {{Glossary("Identity provider", "identity provider")}} (IdP) that validated the identity assertion (a verified claim of the remote peer's identity).

## Value

A string containing the domain name of the identity provider that validated this identity.

## Examples

### Displaying the identity provider domain

In this example, the {{domxref("RTCPeerConnection.peerIdentity")}} promise resolves with an {{domxref("RTCIdentityAssertion")}} whose `idp` property is logged to the console.

```js
const pc = new RTCPeerConnection();

// …

async function getIdentityProvider() {
try {
const identity = await pc.peerIdentity;
console.log(`Identity provider: ${identity.idp}`);
} catch (err) {
console.error("Failed to get peer identity:", err);
}
}

getIdentityProvider();
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("RTCIdentityAssertion.name")}}
- {{domxref("RTCPeerConnection.peerIdentity")}}
- [WebRTC API](/en-US/docs/Web/API/WebRTC_API)
34 changes: 32 additions & 2 deletions files/en-us/web/api/rtcidentityassertion/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,33 @@ The **`RTCIdentityAssertion`** interface of the [WebRTC API](/en-US/docs/Web/API
## Instance properties

- {{domxref("RTCIdentityAssertion.idp")}} {{Experimental_Inline}}
- : Indicates the provider of the identity assertion.
- : Indicates the domain name of the {{Glossary("Identity provider", "identity provider")}} (IdP) that validated the identity.
- {{domxref("RTCIdentityAssertion.name")}} {{Experimental_Inline}}
- : Indicates the name of the identity assertion provider.
- : Indicates the verified peer identity as a string in an email address-like format.

## Examples

### Accessing the remote peer's identity

In this example, a function asynchronously waits for the remote peer's identity to be verified via {{domxref("RTCPeerConnection.peerIdentity")}}, then logs the {{Glossary("Identity provider", "identity provider")}} domain and the peer's identity name.

```js
const pc = new RTCPeerConnection();

// …

async function logPeerIdentity() {
try {
const identity = await pc.peerIdentity;
console.log(`IdP domain: ${identity.idp}`);
console.log(`Peer name: ${identity.name}`);
} catch (err) {
console.error("Could not verify peer identity:", err);
}
}

logPeerIdentity();
```

## Specifications

Expand All @@ -25,3 +49,9 @@ The **`RTCIdentityAssertion`** interface of the [WebRTC API](/en-US/docs/Web/API
## Browser compatibility

{{Compat}}

## See also

- {{domxref("RTCPeerConnection.peerIdentity")}}
- {{domxref("RTCPeerConnection.getIdentityAssertion()")}}
- [WebRTC API](/en-US/docs/Web/API/WebRTC_API)
54 changes: 54 additions & 0 deletions files/en-us/web/api/rtcidentityassertion/name/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: "RTCIdentityAssertion: name property"
short-title: name
slug: Web/API/RTCIdentityAssertion/name
page-type: web-api-instance-property
status:
- experimental
browser-compat: api.RTCIdentityAssertion.name
---

{{APIRef("WebRTC")}}{{SeeCompatTable}}

The **`name`** property of the {{domxref("RTCIdentityAssertion")}} interface indicates the verified peer identity. It is a string in an email address-like format (for example, `user@example.com`), as defined by {{RFC(5322)}}.

## Value

A string containing the verified peer identity in an {{RFC(5322)}} email address-like format (for example, `alice@identity.example.com`).

## Examples

### Logging the verified peer identity name

In this example, the {{domxref("RTCPeerConnection.peerIdentity")}} promise is awaited to obtain the identity assertion, and then the peer's verified identity name is logged.

```js
const pc = new RTCPeerConnection();

// …

async function logPeerName() {
try {
const identity = await pc.peerIdentity;
console.log(`Peer identity: ${identity.name}`);
} catch (err) {
console.error("Could not verify peer identity:", err);
}
}

logPeerName();
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("RTCIdentityAssertion.idp")}}
- {{domxref("RTCPeerConnection.peerIdentity")}}
- [WebRTC API](/en-US/docs/Web/API/WebRTC_API)
Loading
Loading