Skip to content

Commit

Permalink
Fix typos and pseudo-typos 2 (#36243)
Browse files Browse the repository at this point in the history
* Fix typos and pseudo-typos 2

* Update files/en-us/mozilla/firefox/releases/36/index.md
  • Loading branch information
Josh-Cena authored Oct 16, 2024
1 parent e4678a8 commit acc6ec7
Show file tree
Hide file tree
Showing 40 changed files with 66 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ The recording steps using this tool are pretty simple:

### Other resources

- [How to Add Custom Callouts to Screencast Videos in Screenflow](https://photography.tutsplus.com/tutorials/how-to-add-custom-callouts-to-screencast-videos-in-screenflow--cms-27122)
- [How to Add Custom Callouts to Screencast Videos in ScreenFlow](https://photography.tutsplus.com/tutorials/how-to-add-custom-callouts-to-screencast-videos-in-screenflow--cms-27122)

## Workflow for creating videos

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Examples:
Usually only instance methods exist, in which case you can put these under the title "Methods".
- We do not document inherited properties and methods of the interface: they are listed on the respective parent interface. We do hint at their existence though.
- We do document properties and methods defined in mixins. Please see the [contribution guide for mixins](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Information_contained_in_a_WebIDL_file#mixins) for more details.
- Special methods like the stringifier (`toString()`) and the jsonizer (`toJSON()`) are also listed if they do exist.
- Special methods like the stringifier (`toString()`) and the jsonifier (`toJSON()`) are also listed if they do exist.
- Named constructors (like `Image()` for {{domxref("HTMLImageElement")}}) are also listed, if relevant.

#### Constructor pages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ partial interface Blob {

### Not throwing exceptions

When the semantics of Webidl is not followed, an exception is often thrown, even without `[SetterThrows]` or `[GetterThrows]` set. For example, in strict mode, if we try to set a read-only property to a new value, that is to call its implicit setter, a read-only property will throw in strict mode.
When the semantics of WebIDL is not followed, an exception is often thrown, even without `[SetterThrows]` or `[GetterThrows]` set. For example, in strict mode, if we try to set a read-only property to a new value, that is to call its implicit setter, a read-only property will throw in strict mode.

Mostly for compatibility purpose, this behavior is sometimes annoying. To prevent this by creating a no-op setter (that is by silently ignoring any attempt to set the property to a new value), the `[LenientSetter]` annotation can be used.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Usually, when teaching the specifics of CSS syntax, it is clearer and more obvio
```css
/* duration | timing-function | delay | iteration-count
direction | fill-mode | play-state | name */
animation: 3s ease-in 1s 2 reverse both paused slidein;
animation: 3s ease-in 1s 2 reverse both paused slide-in;
```

In this example, the first value that can be parsed as a [`<time>`](/en-US/docs/Web/CSS/time) is assigned to the [`animation-duration`](/en-US/docs/Web/CSS/animation-duration) property, and the second value that can be parsed as time is assigned to [`animation-delay`](/en-US/docs/Web/CSS/animation-delay). (For more information, see [animation syntax](/en-US/docs/Web/CSS/animation#syntax) details.)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ Set the document language using the [`lang`](/en-US/docs/Web/HTML/Global_attribu

This is good for accessibility and search engines, helps with localizing content, and reminds people to use best practices.

### Document characterset
### Document character set

You should also define your document's characterset like so:
You should also define your document's character set like so:

```html example-good
<meta charset="utf-8" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,8 @@ For inserting values into strings, use [template literals](/en-US/docs/Web/JavaS

Good variable names are essential to understanding code.

<!-- cSpell:ignore acclmtr -->

- Use short identifiers, and avoid non-common abbreviations. Good variable names are usually between 3 to 10-character long, but as a hint only. For example, `accelerometer` is more descriptive than abbreviating to `acclmtr` for the sake of character length.
- Try to use real-world relevant examples where each variable has clear semantics. Only fall back to placeholder names like `foo` and `bar` when the example is simple and contrived.
- Do not use the [Hungarian notation](https://en.wikipedia.org/wiki/Hungarian_notation) naming convention. Do not prefix the variable name with its type. For example, write `bought = car.buyer !== null` rather than `bBought = oCar.sBuyer != null` or `name = "John Doe"` instead of `sName = "John Doe"`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,8 @@ In general, use the first entry at [Dictionary.com](https://www.dictionary.com/)
For example, if you [look up "behaviour"](https://www.dictionary.com/browse/behaviour) (with an additional _u_ added to the American standard form), you find the phrase "Chiefly British" followed by a link to the American standard form, ["behavior"](https://www.dictionary.com/browse/behavior).
Do not use variant spelling.

<!-- cSpell:ignore localise behaviour colour -->

- **Correct**: localize, behavior, color
- **Incorrect**: localise, behaviour, colour

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Events have three functions:
Handle a change in captive portal status:

```js
function handlePortalStatus(portalstatusInfo) {
console.log(`The portal status is now: ${portalstatusInfo.details}`);
function handlePortalStatus(portalStatusInfo) {
console.log(`The portal status is now: ${portalStatusInfo.details}`);
}

browser.captivePortal.onStateChanged.addListener(handlePortalStatus);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The script gets access to a number of objects that help the injected script inte
- `$0`
- : Contains a reference to the element that's currently selected in the devtools Inspector.
- `inspect()`
- : Given an object, if it is an DOM element in the page, selects it in the devtools Inspector, otherwise it creates an object preview in the webconsole.
- : Given an object, if it is an DOM element in the page, selects it in the devtools Inspector, otherwise it creates an object preview in the console.

[See some examples.](#examples)

Expand Down Expand Up @@ -102,10 +102,10 @@ function handleResult(result) {
}
}

const checkjQuery = "typeof jQuery !== 'undefined'";
const checkJQuery = "typeof jQuery !== 'undefined'";

evalButton.addEventListener("click", () => {
browser.devtools.inspectedWindow.eval(checkjQuery).then(handleResult);
browser.devtools.inspectedWindow.eval(checkJQuery).then(handleResult);
});
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This is an asynchronous function that returns a [`Promise`](/en-US/docs/Web/Java

```js-nolint
browser.find.find(
queryphrase, // string
queryPhrase, // string
options // optional object
)
```
Expand All @@ -47,7 +47,7 @@ browser.find.find(
- `tabId`
- : `integer`. ID of the tab to search. Defaults to the active tab.

- `queryphrase`
- `queryPhrase`
- : `string`. The text to search for.

### Return value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ Events have three functions:
When the user clicks the page action, hide it, and navigate the active tab to "<https://giphy.com/explore/cat>":

```js
let CATGIFS = "https://giphy.com/explore/cat";
let catGifs = "https://giphy.com/explore/cat";

browser.pageAction.onClicked.addListener((tab) => {
browser.pageAction.hide(tab.id);
browser.tabs.update({ url: CATGIFS });
browser.tabs.update({ url: catGifs });
});

browser.pageAction.onClicked.addListener(() => {});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ browser.theme.update(
Sets the browser theme to use a sun graphic with a complementary background color:

```js
const suntheme = {
const sunTheme = {
images: {
theme_frame: "sun.jpg",
},
Expand All @@ -42,7 +42,7 @@ const suntheme = {
},
};

browser.theme.update(suntheme);
browser.theme.update(sunTheme);
```

Set the theme for the focused window only:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ This example adds an `ondata` listener which replaces "Example" in the response
> [!NOTE]
> This example only works for occurrences of "Example" that are entirely contained within a data chunk, and not ones that straddle two chunks (which might happen \~0.1% of the time for large documents). Additionally it only deals with UTF-8-coded documents. A real implementation of this would have to be more complex.
<!-- cSpell:ignore Examp -->

```js
function listener(details) {
const filter = browser.webRequest.filterResponseData(details.requestId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ browser.runtime.onMessage.addListener(handleMessage);

If you need to exchange messages between the content scripts running in the target window and a devtools document, it's a good idea to use the {{WebExtAPIRef("runtime.connect()")}} and {{WebExtAPIRef("runtime.onConnect")}} to set up a connection between the background page and the devtools document. The background page can then maintain a mapping between tab IDs and {{WebExtAPIRef("runtime.Port")}} objects, and use this to route messages between the two scopes.

![The background page tab ID is connected to the content script on the content page by a runtime.sendmessage() object. The Port of the background page is connected to the port of the Devtools document by a port.postMessage() object.](devtools-content-scripts.png)
![The background page tab ID is connected to the content script on the content page by a runtime.sendMessage() object. The Port of the background page is connected to the port of the Devtools document by a port.postMessage() object.](devtools-content-scripts.png)

## Limitations of the devtools APIs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ if (typeof browser == "undefined") {
globalThis.browser = chrome;
}
browser.runtime.onInstalled.addListener(() => {
browser.tabs.create({ url: "http://example.com/firstrun.html" });
browser.tabs.create({ url: "http://example.com/first-run.html" });
});
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The extra privileges include:
- [XMLHttpRequest](/en-US/docs/Web/API/XMLHttpRequest) and [fetch](/en-US/docs/Web/API/Fetch_API) access to those origins without cross-origin restrictions (though not for requests from content scripts, as was the case in Manifest V2).
- the ability to read tab-specific metadata without the "tabs" permission, such as the `url`, `title`, and `favIconUrl` properties of {{WebExtAPIRef("tabs.Tab")}} objects.
- the ability to inject scripts programmatically (using {{webextAPIref("tabs/executeScript", "tabs.executeScript()")}}) into pages served from those origins.
- the ability to receive events from the {{webextAPIref("webrequest")}} API for these hosts.
- the ability to receive events from the {{webextAPIref("webRequest")}} API for these hosts.
- the ability to access cookies for that host using the {{webextAPIref("cookies")}} API, as long as the `"cookies"` API permission is also included.
- bypassing tracking protection for extension pages where a host is specified as a full domain or with wildcards.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ For production use, [DOMPurify](https://github.com/cure53/DOMPurify) comes as a
"content_scripts": [
{
"matches" : ["<all_urls>"],
"js": ["purify.min.js", "myinjectionscript.js"]
"js": ["purify.min.js", "my-injection-script.js"]
}
]
```

Then, in myinjectionscript.js you can read the external HTML, sanitize it, and add it to a page's DOM:
Then, in `my-injection-script.js` you can read the external HTML, sanitize it, and add it to a page's DOM:

```js
let elem = document.createElement("div");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ When the window is no longer needed, it can be closed programmatically.
For example, after the user clicks a button, you may pass the current window's id to {{WebExtAPIRef("windows.remove()")}}:

```js
document.getElementById("closeme").addEventListener("click", () => {
document.getElementById("close-me").addEventListener("click", () => {
let winId = browser.windows.WINDOW_ID_CURRENT;
let removing = browser.windows.remove(winId);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ To manage contextual identities, you use the {{WebExtAPIRef("contextualIdentitie
Several extension APIs include the `cookieStoreId` in objects to enable extensions to associate these objects with specific contextual identities.

- {{WebExtAPIRef("browsingData.removeCookies()")}} and {{WebExtAPIRef("browsingData.removeLocalStorage()")}} where you use {{WebExtAPIRef("browsingData.removalOptions")}} to set the cookie store items are removed from.
- {{WebExtAPIRef("contentscripts.register")}} enables you to register a content script restricted to documents associated with one or more `cookieStoreIds`.
- {{WebExtAPIRef("contentScripts.register")}} enables you to register a content script restricted to documents associated with one or more `cookieStoreIds`.
- {{WebExtAPIRef("downloads")}} where you can associate a download with a cookie store.
- {{WebExtAPIRef("proxy")}} where the details passed into the {{WebExtAPIRef("proxy.onRequest")}} listener identify the cookie store associated with the request.
- {{WebExtAPIRef("tabs")}} where you can {{WebExtAPIRef("tabs.create","create")}} a tab in a container tab, {{WebExtAPIRef("tabs.tab","get")}} the `cookieStoreId` for a tab, and {{WebExtAPIRef("tabs.query","query")}} tabs based on their associated cookie store.
- {{WebExtAPIRef("userscripts.register")}} enables you to register a content script restricted to documents associated with one or more `cookieStoreIds`.
- {{WebExtAPIRef("webrequest")}} where all the events return the `cookieStoreId` of the request.
- {{WebExtAPIRef("userScripts.register")}} enables you to register a content script restricted to documents associated with one or more `cookieStoreIds`.
- {{WebExtAPIRef("webRequest")}} where all the events return the `cookieStoreId` of the request.
- {{WebExtAPIRef("windows.create")}} where you can specify the cookie store for the tabs added to a window when it's created.

## Permissions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ Finally, the document fragment is written to the `<div id="tabs-list">` element:
Another related example feature is the "Alert active tab" info option that dumps all the {{WebExtAPIRef("tabs.Tab")}} object properties for the active tab into an alert:

```js
else if (e.target.id === "tabs-alertinfo") {
else if (e.target.id === "tabs-alert-info") {
callOnActiveTab((tab) => {
let props = "";
for (const item in tab) {
Expand Down Expand Up @@ -278,7 +278,7 @@ But first, here is a demonstration of the feature in action:

<a href="#" id="tabs-duplicate">Duplicate active tab</a><br />
<a href="#" id="tabs-reload">Reload active tab</a><br />
<a href="#" id="tabs-alertinfo">Alert active tab info</a><br />
<a href="#" id="tabs-alert-info">Alert active tab info</a><br />
```
- tabs.js
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/mozilla/firefox/experimental_features/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ HTML password input elements ([`<input type="password">`](/en-US/docs/Web/HTML/E

### Hex boxes to display stray control characters

This feature renders control characters (Unicode category Cc) other than _tab_ (`U+0009`), _line feed_ (`U+000A`), _form feed_ (`U+000C`), and _carriage return_ (`U+000D`) as a hexbox when they are not expected. (See [Firefox bug 1099557](https://bugzil.la/1099557) for more details.)
This feature renders control characters (Unicode category Cc) other than _tab_ (`U+0009`), _line feed_ (`U+000A`), _form feed_ (`U+000C`), and _carriage return_ (`U+000D`) as a hex box when they are not expected. (See [Firefox bug 1099557](https://bugzil.la/1099557) for more details.)

<table>
<thead>
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/mozilla/firefox/releases/121/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ This article provides information about the changes in Firefox 121 that affect d
These features are newly shipped in Firefox 121 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.

- Custom element state pseudo-class: `dom.element.customstateset.enabled`
- : Custom elements can expose their internal state via the {{domxref("ElementInternals.states","states")}} property as a {{domxref("CustomStateSet")}}. A CSS custom state pseudo-class such as `:--somestate` can match that element's state. ([Firefox bug 1861466](https://bugzil.la/1861466))
- : Custom elements can expose their internal state via the {{domxref("ElementInternals.states","states")}} property as a {{domxref("CustomStateSet")}}. A CSS custom state pseudo-class such as `:--some-state` can match that element's state. ([Firefox bug 1861466](https://bugzil.la/1861466))
- `showPicker()` method for HTML select elements: `dom.select.showPicker.enabled`
- : The {{domxref("HTMLSelectElement.showPicker()")}} method programmatically launches the browser picker for a {{HTMLElement("select")}} element, triggered by user interaction. ([Firefox bug 1854112](https://bugzil.la/1854112))

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/mozilla/firefox/releases/125/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ No notable changes.
Here are some additional details on the events for lost and restored canvas contexts:

- Applications can monitor for [`contextlost`](/en-US/docs/Web/API/HTMLCanvasElement/contextlost_event) and [`contextrestored`](/en-US/docs/Web/API/HTMLCanvasElement/contextrestored_event) events, which are fired on at [`HTMLCanvasElement`](/en-US/docs/Web/API/HTMLCanvasElement) when the context is lost and recovered, respectively, and can also check the context using [`CanvasRenderingContext2D.isContextLost()`](/en-US/docs/Web/API/CanvasRenderingContext2D/isContextLost).
- After emitting `contentlost`, a browser will try and restart the lost context, by default, but code can prevent this by cancelling the event.
- After emitting `contextlost`, a browser will try and restart the lost context, by default, but code can prevent this by cancelling the event.
- Offscreen canvases can be monitored in the same way, but using [`OffScreenCanvas`](/en-US/docs/Web/API/OffscreenCanvas) events [`contextlost`](/en-US/docs/Web/API/OffscreenCanvas/contextlost_event) and [`contextrestored`](/en-US/docs/Web/API/OffscreenCanvas/contextrestored_event), along with [`OffscreenCanvasRenderingContext2D.isContextLost()`](/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D#context).

- Added support for the [`shadowrootclonable`](/en-US/docs/Web/HTML/Element/template#shadowrootclonable) attribute of the `<template>` element, and the [`shadowRootClonable`](/en-US/docs/Web/API/HTMLTemplateElement/shadowRootClonable) property of the `HTMLTemplateElement` interface that reflects it.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/mozilla/firefox/releases/128/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This article provides information about the changes in Firefox 128 that affect d

### JavaScript

- Resizeable {{jsxref("ArrayBuffer")}} and growable {{jsxref("SharedArrayBuffer")}} are now supported, allowing the size of buffers to be changed without having to allocate a new buffer and copy data into it ([Firefox bug 1884150](https://bugzil.la/1884150)).
- Resizable {{jsxref("ArrayBuffer")}} and growable {{jsxref("SharedArrayBuffer")}} are now supported, allowing the size of buffers to be changed without having to allocate a new buffer and copy data into it ([Firefox bug 1884150](https://bugzil.la/1884150)).
The relevant methods and properties are:

- Grow {{jsxref("SharedArrayBuffer")}} using the {{jsxref("SharedArrayBuffer.prototype.grow()")}} method.
Expand Down
Loading

0 comments on commit acc6ec7

Please sign in to comment.