Skip to content

Commit

Permalink
Merge branch 'main' into aria-examples-work
Browse files Browse the repository at this point in the history
  • Loading branch information
dletorey authored Dec 16, 2024
2 parents c4a62ca + ab1bf2c commit 4817cad
Show file tree
Hide file tree
Showing 139 changed files with 1,860 additions and 574 deletions.
2 changes: 1 addition & 1 deletion .vscode/dictionaries/code-entities.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ importmap
imscjs
inactivetitlebarcolor
indexeddb-examples
indexifembedded
inputreport
inputsourceschange
intl.uidirection.locale
Expand Down Expand Up @@ -594,7 +595,6 @@ reflectionchange
removestream
replacewithcommas
replacewithspaces
RFCOMM
RGBX
RGUI
richlistbox
Expand Down
1 change: 1 addition & 0 deletions .vscode/dictionaries/proper-names.txt
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ Leitura
Lemieux
Lempel
Lennart
leptos
Lesh
Lexi
Leyla
Expand Down
1 change: 1 addition & 0 deletions .vscode/dictionaries/terms-abbreviations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ retarget
retargeted
retargeting
retargetings
RFCOMM
RGTC
roadmaps
Rockhopper
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/glossary/function/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function loop(x) {
// Arrow function
const loop2 = (x) => {
if (x >= 10) return;
loop(x + 1);
loop2(x + 1);
};
```

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/glossary/json/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ JSON can represent numbers, booleans, strings, `null`, arrays (ordered sequences

## See also

- [JSON](/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON)
- [JSON](https://en.wikipedia.org/wiki/JSON) on Wikipedia
- [JSON](/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON) on MDN
2 changes: 1 addition & 1 deletion files/en-us/glossary/web_performance/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ Objectively, it is measurable time, in milliseconds, it takes for the web page o

## See also

- [Learn about web performance](/en-US/docs/Learn/Performance)
- [Web performance](/en-US/docs/Web/Performance) guides
- Related glossary terms:
- {{Glossary("Perceived performance")}}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ browser-compat: webextensions.api.identity.launchWebAuthFlow

Performs the first part of an [OAuth2](https://oauth.net/2/) flow, including user authentication and client authorization.

This function's only mandatory parameter is the service provider's authorization URL, which must contain a number of URL parameters including the [redirect URL](/en-US/docs/Mozilla/Add-ons/WebExtensions/API/identity#getting_the_redirect_url) and the extension's [client ID](/en-US/docs/Mozilla/Add-ons/WebExtensions/API/identity#registering_your_add-on). The service provider then:
This function's only mandatory parameter is the service provider's authorization URL, which must contain a number of URL parameters including the [redirect URL](/en-US/docs/Mozilla/Add-ons/WebExtensions/API/identity#getting_the_redirect_url) and the extension's [client ID](/en-US/docs/Mozilla/Add-ons/WebExtensions/API/identity#registering_your_extension). The service provider then:

- authenticates the user with the service provider, if necessary (that is: if they are not already signed in)
- asks the user to authorize the extension to access the requested data, if necessary (that is: if the user has not already authorized the extension)
Expand Down Expand Up @@ -44,7 +44,7 @@ let authorizing = browser.identity.launchWebAuthFlow(
- : `object`. Options for the flow, containing the following properties:

- `url`
- : `string`. The URL offered by the OAuth2 service provider to get an access token. The details of this URL should be given in the documentation for the service provider in question, but the URL parameters should always include: the [redirect URL](/en-US/docs/Mozilla/Add-ons/WebExtensions/API/identity#getting_the_redirect_url) and the extension's [client ID](/en-US/docs/Mozilla/Add-ons/WebExtensions/API/identity#registering_your_add-on).
- : `string`. The URL offered by the OAuth2 service provider to get an access token. The details of this URL should be given in the documentation for the service provider in question, but the URL parameters should always include: the [redirect URL](/en-US/docs/Mozilla/Add-ons/WebExtensions/API/identity#getting_the_redirect_url) and the extension's [client ID](/en-US/docs/Mozilla/Add-ons/WebExtensions/API/identity#registering_your_extension).
- `redirect_uri` {{optional_inline}}
- : `string`. This represents the URI your extension is redirected to when the flow has finished. Not required for the flow to work on the browser side if it matches the generated redirect URL. See [Getting the redirect URL](/en-US/docs/Mozilla/Add-ons/WebExtensions/API/identity#getting_the_redirect_url).
- `interactive` {{optional_inline}}
Expand Down
4 changes: 1 addition & 3 deletions files/en-us/mozilla/add-ons/webextensions/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,10 @@ setCookie.then(logCookie, logError);

## Browser API differences

Note that this is different from Google Chrome's extension system, which uses the `chrome` namespace instead of `browser`, and which uses callbacks instead of promises for asynchronous functions. As a porting aid, the Firefox implementation of WebExtensions APIs supports `chrome` and callbacks as well as `browser` and promises. Mozilla has also written a polyfill which enables code that uses `browser` and promises to work unchanged in Chrome: <https://github.com/mozilla/webextension-polyfill>.
Note that this is different from Google Chrome's extension system, which uses the `chrome` namespace instead of `browser`, and which uses callbacks instead of promises for asynchronous functions in Manifest V2. As a porting aid, the Firefox implementation of WebExtensions APIs supports `chrome` and callbacks as well as `browser` and promises. Mozilla has also written a polyfill which enables code that uses `browser` and promises to work unchanged in Chrome: <https://github.com/mozilla/webextension-polyfill>.

Firefox also implements these APIs under the `chrome` namespace using callbacks. This allows code written for Chrome to run largely unchanged in Firefox for the APIs documented here.

Microsoft Edge uses the `browser` namespace, but doesn't yet support promise-based asynchronous APIs. In Edge, for the time being, asynchronous APIs must use callbacks.

Not all browsers support all the APIs: for the details, see [Browser support for JavaScript APIs](/en-US/docs/Mozilla/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs) and [Chrome incompatibilities](/en-US/docs/Mozilla/Add-ons/WebExtensions/Chrome_incompatibilities).

## Examples
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,33 @@ let uninstalling = browser.management.uninstall(
<!---->

- If `id` is the calling add-on's ID, `showConfirmDialog` defaults to `false`.
- If `id` is a the ID of a different add-on, the `showConfirmDialog` option is ignored and the confirmation dialog is always shown.
- If `id` is the ID of a different add-on, the `showConfirmDialog` option is ignored and the confirmation dialog is always shown.

### Return value

A [`Promise`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) that will be rejected with an error message if the user canceled uninstall.
A [`Promise`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) that will be rejected with an error message if the user canceled the uninstallation.

## Browser compatibility

{{Compat}}

## Examples

Uninstall the add-on whose ID is "my-addon-id", asking the user to confirm. In the callback, check whether the user canceled uninstallation.

Note that we haven't passed a fulfillment handler because if uninstallation succeeds, the add-on is no longer around to handle it.
Uninstall the add-on whose ID is "addon-id" and ask the user to confirm. In the callback, we check whether the user canceled the uninstallation or if the operation succeeded.

```js
let id = "my-addon-id";
let id = "addon-id";

function onCanceled(error) {
console.log(`Uninstall canceled: ${error}`);
console.log(`Canceled: ${error}`);
}

function onUninstalled() {
console.log("Uninstalled");
}

let uninstalling = browser.management.uninstall(id);
uninstalling.then(null, onCanceled);
uninstalling.then(onUninstalled, onCanceled);
```

{{WebExtExamples}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The first three properties - `type`, `title`, `message` - are mandatory in {{Web
- `title`
- : `string`. The notification's title.
- `iconUrl` {{optional_inline}}
- : `string`. A URL pointing to an icon to display in the notification. The URL can be: a data URL, a blob URL, a http or https URL, or the [relative URL of a file within the extension](/en-US/docs/Mozilla/Add-ons/WebExtensions/Chrome_incompatibilities#relative_urls). When using an SVG image, ensure that the image includes height and width attributes, for example, `<svg width="96" height="96"…`. Otherwise, the image may not display.
- : `string`. A URL pointing to an icon to display in the notification. The URL can be: a data URL, a blob URL, a http or https URL, or the relative URL of a file within the extension. When using an SVG image, ensure that the image includes height and width attributes, for example, `<svg width="96" height="96"…`. Otherwise, the image may not display.
- `contextMessage` {{optional_inline}}
- : `string`. Supplementary content to display.
- `priority` {{optional_inline}}
Expand Down
40 changes: 0 additions & 40 deletions files/en-us/mozilla/firefox/experimental_features/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,46 +264,6 @@ The {{cssxref("initial-letter")}} CSS property is part of the [CSS Inline Layout
</tbody>
</table>

### Single numbers as aspect ratio in media queries

Support for using a single {{cssxref("number")}} as a {{cssxref("ratio")}} when specifying the aspect ratio for a [media query](/en-US/docs/Web/CSS/CSS_media_queries). (See [Firefox bug 1565562](https://bugzil.la/1565562) for more details.)

<table>
<thead>
<tr>
<th>Release channel</th>
<th>Version added</th>
<th>Enabled by default?</th>
</tr>
</thead>
<tbody>
<tr>
<th>Nightly</th>
<td>70</td>
<td>No</td>
</tr>
<tr>
<th>Developer Edition</th>
<td>70</td>
<td>No</td>
</tr>
<tr>
<th>Beta</th>
<td>70</td>
<td>No</td>
</tr>
<tr>
<th>Release</th>
<td>70</td>
<td>No</td>
</tr>
<tr>
<th>Preference name</th>
<td colspan="2"><code>layout.css.aspect-ratio-number.enabled</code></td>
</tr>
</tbody>
</table>

### fit-content() function

The {{cssxref("fit-content_function", "fit-content()")}} function as it applies to {{cssxref("width")}} and other sizing properties. This function is already well-supported for CSS Grid Layout track sizing. (See [Firefox bug 1312588](https://bugzil.la/1312588) for more details.)
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/mozilla/firefox/releases/133/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This article provides information about the changes in Firefox 133 that affect d

### HTML

- The [`viewport <meta>` tag](/en-US/docs/Web/HTML/Viewport_meta_tag) now supports the [`interactive-widgets`](/en-US/docs/Web/HTML/Viewport_meta_tag#the_effect_of_interactive_ui_widgets) attribute, this influences the size of the viewport when common UI widgets, such as virtual keyboards, are added to the screen. ([Firefox bug 1831649](https://bugzil.la/1831649) and [Firefox bug 1920755](https://bugzil.la/1920755)).
- The [`viewport <meta>` tag](/en-US/docs/Web/HTML/Viewport_meta_tag) now supports the [`interactive-widget`](/en-US/docs/Web/HTML/Viewport_meta_tag#the_effect_of_interactive_ui_widgets) attribute, this influences the size of the viewport when common UI widgets, such as virtual keyboards, are added to the screen. ([Firefox bug 1831649](https://bugzil.la/1831649) and [Firefox bug 1920755](https://bugzil.la/1920755)).

### CSS

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/mozilla/firefox/releases/135/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ This article provides information about the changes in Firefox 135 that affect d

## Experimental web features

These features are newly shipped in Firefox 134 but are disabled by default. To experiment with them, search for the appropriate preference on the `about:config` page and set it to `true`. You can find more such features on the [Experimental features](/en-US/docs/Mozilla/Firefox/Experimental_features) page.
These features are newly shipped in Firefox 135 but are disabled by default. To experiment with them, search for the appropriate preference on the `about:config` page and set it to `true`. You can find more such features on the [Experimental features](/en-US/docs/Mozilla/Firefox/Experimental_features) page.

## Older versions

Expand Down
5 changes: 2 additions & 3 deletions files/en-us/web/api/dommatrix/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: DOMMatrix (WebKitCSSMatrix)
title: DOMMatrix
slug: Web/API/DOMMatrix
page-type: web-api-interface
browser-compat: api.DOMMatrix
Expand All @@ -8,11 +8,10 @@ browser-compat: api.DOMMatrix
{{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}}

The **`DOMMatrix`** interface represents 4×4 matrices, suitable for 2D and 3D operations including rotation and translation. It is a mutable version of the {{domxref("DOMMatrixReadOnly")}} interface.
The interface is available inside [web workers](/en-US/docs/Web/API/Web_Workers_API).

**`WebKitCSSMatrix`** and **`SVGMatrix`** are aliases to **`DOMMatrix`**.

This interface should be available inside [web workers](/en-US/docs/Web/API/Web_Workers_API), though some implementations don't allow it yet.

{{InheritanceDiagram}}

## Constructor
Expand Down
50 changes: 50 additions & 0 deletions files/en-us/web/api/dommatrix/invertself/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: "DOMMatrix: invertSelf() method"
short-title: invertSelf()
slug: Web/API/DOMMatrix/invertSelf
page-type: web-api-instance-method
browser-compat: api.DOMMatrix.invertSelf
---

{{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}}

The **`invertSelf()`** method of the {{domxref("DOMMatrix")}} interface inverts the original matrix. If the matrix cannot be inverted, the new matrix's components are all set to `NaN` and its {{domxref("DOMMatrix.is2D", "is2D")}} property is set to `false`.

To invert a matrix without mutating it, see {{domxref("DOMMatrixReadOnly.inverse()")}}

## Syntax

```js-nolint
DOMMatrix.invertSelf()
```

### Return value

A {{domxref("DOMMatrix")}}.

## Examples

In this example, we create a matrix with a rotation of 30deg. Then invert it, resulting in a rotation of -30deg.

```js
const matrix = new DOMMatrix().rotate(30);
console.log(matrix.toString());
// output: matrix(0.866, 0.5, -0.5, 0.866, 0, 0)
matrix.invertSelf();
console.log(matrix.toString());
// output: matrix(0.866, -0.5, 0.5, 0.866, 0, 0)
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("DOMMatrixReadOnly.inverse()")}}
- CSS {{CSSxRef("transform-function/matrix", "matrix()")}} function
- CSS {{CSSxRef("transform-function/matrix3d", "matrix3d()")}} function
74 changes: 74 additions & 0 deletions files/en-us/web/api/dommatrix/rotateself/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
title: "DOMMatrix: rotateSelf() method"
short-title: rotateSelf()
slug: Web/API/DOMMatrix/rotateSelf
page-type: web-api-instance-method
browser-compat: api.DOMMatrix.rotateSelf
---

{{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}}

The `rotateSelf()` method of the {{domxref("DOMMatrix")}} interface is a mutable transformation method that modifies a matrix. It rotates the source matrix around each of its axes by the specified number of degrees and returns the rotated matrix.

To rotate a matrix without mutating it, see {{domxref("DOMMatrixReadOnly.rotate()")}}

## Syntax

```js-nolint
DOMMatrix.rotateSelf()
DOMMatrix.rotateSelf(rotX)
DOMMatrix.rotateSelf(rotX, rotY)
DOMMatrix.rotateSelf(rotX, rotY, rotZ)
```

### Parameters

- `rotX`
- : A number; the x-coordinate of the vector denoting the axis of rotation
- `rotY` {{optional_inline}}
- : A number; the y-coordinate of the vector denoting the axis of rotation.
- `rotZ` {{optional_inline}}
- : A number; the z-coordinate of the vector denoting the axis of rotation

If only one parameter is passed, `rotZ` is the value of `rotX`, and both `rotx` and `rotY` are `0`, and the rotation is a 2D rotation. If `rotX` and `rotY` are non-zero, the [`is_2d`](/en-US/docs/Web/API/DOMMatrix#is2d) is `false`.

### Return value

Returns itself; the [`DOMMatrix`](/en-US/docs/Web/API/DOMMatrix) rotated by the given
vectors.

## Examples

```js
const matrix = new DOMMatrix(); // create a matrix
console.log(matrix.toString()); // output: "matrix(1, 0, 0, 1, 0, 0)"
matrix.rotateSelf(30); // mutate it
console.log(matrix); // output: "matrix(0.866, 0.5, -0.5, 0.866, 0, 0)"
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("DOMMatrixReadOnly.rotate()")}}
- CSS {{cssxref("transform")}} property
- CSS {{cssxref("rotate")}} property
- CSS {{cssxref("transform-function")}} functions
- {{cssxref("transform-function/rotate", "rotate()")}}
- {{cssxref("transform-function/rotate3d", "rotate3d()")}}
- {{cssxref("transform-function/rotateX", "rotateX()")}}
- {{cssxref("transform-function/rotateY", "rotateY()")}}
- {{cssxref("transform-function/rotateZ", "rotateZ()")}}
- [CSS transforms](/en-US/docs/Web/CSS/CSS_transforms) module
- SVG [`transform`](/en-US/docs/Web/SVG/Attribute/transform) attribute
- {{domxref("CanvasRenderingContext2D")}} interface methods
- {{domxref("CanvasRenderingContext2D.rotate()")}}
- {{domxref("CanvasRenderingContext2D.transform()")}}
- {{domxref("CanvasRenderingContext2D.setTransform()")}}
- {{domxref("CanvasRenderingContext2D.resetTransform()")}}
Loading

0 comments on commit 4817cad

Please sign in to comment.