From 40c519fd9981925027976a2294de9e1574eb5b82 Mon Sep 17 00:00:00 2001 From: Spax <83354374+SpiritAxolotl@users.noreply.github.com> Date: Sun, 5 May 2024 15:31:57 -0600 Subject: [PATCH 1/7] change a note to a warning (#33425) --- files/en-us/web/api/element/innerhtml/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/element/innerhtml/index.md b/files/en-us/web/api/element/innerhtml/index.md index eaa05883fbe3048..d6a6adee7aafa9a 100644 --- a/files/en-us/web/api/element/innerhtml/index.md +++ b/files/en-us/web/api/element/innerhtml/index.md @@ -52,7 +52,7 @@ This lets you look at the HTML markup of the element's content nodes. Setting the value of `innerHTML` lets you easily replace the existing contents of an element with new content. -> **Note:** This is a [security risk](#security_considerations) if the string to be inserted might contain potentially malicious content. +> **Warning:** This is a [security risk](#security_considerations) if the string to be inserted might contain potentially malicious content. > When inserting user-supplied data you should always consider using a sanitizer library, in order to sanitize the content before it is inserted. For example, you can erase the entire contents of a document by clearing the contents of the document's {{domxref("Document.body", "body")}} attribute: From c8f8d139207c796a49390614fbe4e65a8ab9bfac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Alvarez?= Date: Sun, 5 May 2024 19:04:29 -0300 Subject: [PATCH 2/7] css nesting: fix spelling (#33418) Fix spelling of "compatibility". --- files/en-us/web/css/css_nesting/using_css_nesting/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/css/css_nesting/using_css_nesting/index.md b/files/en-us/web/css/css_nesting/using_css_nesting/index.md index 57894637d8befef..5fc31187069c0f0 100644 --- a/files/en-us/web/css/css_nesting/using_css_nesting/index.md +++ b/files/en-us/web/css/css_nesting/using_css_nesting/index.md @@ -19,7 +19,7 @@ You can use CSS nesting to create child selectors of a parent, which in turn can There are certain instances where using the `&` nesting selector can be necessary or helpful: - When joining selectors together, such as using [compound selectors](#compound_selectors) or [pseudo-classes](/en-US/docs/Web/CSS/Pseudo-classes). -- For backwards compatability. +- For backwards compatibility. - As a visual indicator to aid with readability, when seeing the `&` nesting selector you know that CSS nesting is being used. ```css From dbd4ba01220a5031d3a26a3ac1490d3269210124 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Mon, 6 May 2024 08:36:40 +1000 Subject: [PATCH 3/7] IDBFactory.databases() - update to spec (#33113) * IDBFactory.databases() - update to spec * Apply suggestions from code review Co-authored-by: sideshowbarker --------- Co-authored-by: sideshowbarker --- .../web/api/idbfactory/databases/index.md | 102 ++++++++++++++++-- files/en-us/web/api/idbfactory/index.md | 16 +-- 2 files changed, 101 insertions(+), 17 deletions(-) diff --git a/files/en-us/web/api/idbfactory/databases/index.md b/files/en-us/web/api/idbfactory/databases/index.md index 123cf46e8cddca7..93d962a93db8217 100644 --- a/files/en-us/web/api/idbfactory/databases/index.md +++ b/files/en-us/web/api/idbfactory/databases/index.md @@ -8,9 +8,9 @@ browser-compat: api.IDBFactory.databases {{ APIRef("IndexedDB") }} {{AvailableInWorkers}} -The **`databases`** method of the {{domxref("IDBFactory")}} interface returns a list representing all the available databases, including their names and versions. +The **`databases`** method of the {{domxref("IDBFactory")}} interface returns a {{jsxref("Promise")}} that fulfills with an array of objects containing the name and version of all the available databases. -> **Note:** This method is introduced in a draft of a specifications and browser compatibility is limited. +This is is a snapshot of the databases, intended primarily to allow web applications to check what databases have been created — in order to, for example, clean up databases created by earlier versions of application code. ## Syntax @@ -20,31 +20,115 @@ databases() ### Parameters -The method does not take in any parameters. +None. ### Return value -A promise that resolves either to an error or a list of dictionaries, each with two elements, `name` and `version`: +A {{jsxref("Promise")}} that fulfills with an an array of objects representing a snapshot of the available databases (or rejects with the error/exceptions below). + +Each array object has the following properties: - `name` - - : The database name. + - : A database name. - `version` - : The database version. +Note that the sequence on the returned objects is undefined. + ### Exceptions - `SecurityError` {{domxref("DOMException")}} - - : Thrown if the method is called from an [opaque origin](https://stackoverflow.com/questions/42239643/when-do-browsers-send-the-origin-header-when-do-browsers-set-the-origin-to-null/42242802#42242802). + + - : Thrown if the method is called from an [opaque origin](https://stackoverflow.com/questions/42239643/when-do-browsers-send-the-origin-header-when-do-browsers-set-the-origin-to-null/42242802#42242802) or the user has disabled storage. + +- `UnknownError` {{domxref("DOMException")}} + - : Thrown if the set of available databases cannot be determined for any reason. ## Examples +### Create and list databases + +This example creates/opens a number of databases. +On successful initialization of each database it lists all the available databases. + +```html hidden +

+```
+
+```js hidden
+const logElement = document.querySelector("#log");
+function log(text) {
+  logElement.innerText = `${logElement.innerText}${text}\n`;
+  logElement.scrollTop = logElement.scrollHeight;
+}
+```
+
+```css hidden
+#log {
+  height: 240px;
+  overflow: scroll;
+  padding: 0.5rem;
+  border: 1px solid black;
+}
+```
+
+#### JavaScript
+
+First we define the function that is used to get and log the available databases.
+This awaits on the promise returned by `indexedDB.databases()` and then iterates the array and lists the values of each element:
+
 ```js
-const promise = indexedDB.databases();
-promise.then((databases) => {
-  console.log(databases);
+async function getDb() {
+  const databases = await indexedDB.databases();
+  log("List databases:");
+  databases.forEach((element) => {
+    log(`name: ${element.name}, version: ${element.version}`);
+  });
+}
+```
+
+To demonstrate how the above function is used, below we create two databases.
+For each database, we log just before the database is opened.
+We also log on successful initialization (or error) and then also log the available databases.
+
+```js
+// Create a database named toDoList with default version (1)
+const dbName1 = "toDoList";
+log(`Opening: ${dbName1}`);
+let DBOpenRequest = window.indexedDB.open(dbName1);
+
+DBOpenRequest.addEventListener("error", (event) => {
+  log(`Error opening: ${dbName1}`);
+  getDb();
+});
+
+DBOpenRequest.addEventListener("success", (event) => {
+  log(`Initialized: ${dbName1}`);
+  getDb();
+});
+
+// Create database "AnotherDb"
+const dbName2 = "AnotherDb";
+log(`Opening ${dbName2}`);
+DBOpenRequest = window.indexedDB.open(dbName2, 2);
+
+DBOpenRequest.addEventListener("error", (event) => {
+  log(`Error opening: ${dbName2}`);
+  getDb();
+});
+
+DBOpenRequest.addEventListener("success", (event) => {
+  log(`Initialized: ${dbName2}`);
+  getDb();
 });
 ```
 
+#### Result
+
+The result is shown below. Note that the time taken to get the databases and their order is undefined.
+
+{{EmbedLiveSample('Create and list databases', '100%', '280px')}}
+
 ## Specifications
 
 {{Specifications}}
diff --git a/files/en-us/web/api/idbfactory/index.md b/files/en-us/web/api/idbfactory/index.md
index bfcb12d7bc59931..0b66729ab87b781 100644
--- a/files/en-us/web/api/idbfactory/index.md
+++ b/files/en-us/web/api/idbfactory/index.md
@@ -11,14 +11,14 @@ The **`IDBFactory`** interface of the [IndexedDB API](/en-US/docs/Web/API/Indexe
 
 ## Instance methods
 
-- {{domxref("IDBFactory.open")}}
-  - : The current method to request opening a [connection to a database](/en-US/docs/Web/API/IndexedDB_API/Basic_Terminology#database_connection).
-- {{domxref("IDBFactory.deleteDatabase")}}
-  - : A method to request the deletion of a database.
-- {{domxref("IDBFactory.cmp")}}
-  - : A method that compares two keys and returns a result indicating which one is greater in value.
-- {{domxref("IDBFactory.databases")}}
-  - : A method that returns a list of all available databases, including their names and versions.
+- {{domxref("IDBFactory.open()")}}
+  - : Requests opening a [connection to a database](/en-US/docs/Web/API/IndexedDB_API/Basic_Terminology#database_connection).
+- {{domxref("IDBFactory.deleteDatabase()")}}
+  - : Requests the deletion of a database.
+- {{domxref("IDBFactory.cmp()")}}
+  - : Compares two keys and returns a result indicating which one is greater in value.
+- {{domxref("IDBFactory.databases()")}}
+  - : Returns a promise that fulfills with an array of all available databases, including their names and versions.
 
 ## Example
 

From b25347dcfa6ebf435bffd9cb0128fb55252414a6 Mon Sep 17 00:00:00 2001
From: MDN Web Docs GitHub Bot <108879845+mdn-bot@users.noreply.github.com>
Date: Mon, 6 May 2024 09:44:44 +0200
Subject: [PATCH 4/7] Update InterfaceData based on WebRef (#33403)

---
 files/jsondata/InterfaceData.json | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/files/jsondata/InterfaceData.json b/files/jsondata/InterfaceData.json
index e0d73fb9fca9f43..04fe5f274b74e4d 100644
--- a/files/jsondata/InterfaceData.json
+++ b/files/jsondata/InterfaceData.json
@@ -864,6 +864,10 @@
       "inh": "ReportBody",
       "impl": []
     },
+    "DeviceChangeEvent": {
+      "inh": "Event",
+      "impl": []
+    },
     "DeviceMotionEvent": {
       "inh": "Event",
       "impl": []

From 4d26c993afa39460cafd2e4f87a58e19d5262a39 Mon Sep 17 00:00:00 2001
From: Norman Rauschen 
Date: Mon, 6 May 2024 10:50:52 +0200
Subject: [PATCH 5/7] Spelling/grammar fixes (#33400)

* Fix typo

`usoing` -> `using`

* Spelling fix

`misissuance` is uncountable.

* Misspelling

`Digicert` -> `DigiCert`

* Fix typo

`illegimitate` -> `illegitimate`

* Fix typo

`embeded` -> `embedded`

* Spelling fixes

`Kbps` -> `kbps`

* Spelling fixes

`Kbps` -> `kbps`

* Fix typo

`kbpz` -> `kbps`

* Typo & spelling fixes

`ffpmeg` -> `FFmpeg`
`ffmpeg` -> `FFmpeg`

* Fix typo

`Bernouilli` -> `Bernoulli`
---
 files/en-us/web/mathml/examples/index.md               |  4 ++--
 .../dash_adaptive_streaming_for_html_5_video/index.md  |  4 ++--
 files/en-us/web/media/formats/audio_codecs/index.md    |  2 +-
 files/en-us/web/media/formats/video_codecs/index.md    |  6 +++---
 .../web/performance/understanding_latency/index.md     | 10 +++++-----
 files/en-us/web/privacy/third-party_cookies/index.md   |  4 ++--
 .../web/security/certificate_transparency/index.md     |  2 +-
 files/en-us/web/security/index.md                      |  2 +-
 files/en-us/webassembly/reference/memory/load/index.md |  2 +-
 9 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/files/en-us/web/mathml/examples/index.md b/files/en-us/web/mathml/examples/index.md
index 85d86c6b340489f..a216fd6cc54fe76 100644
--- a/files/en-us/web/mathml/examples/index.md
+++ b/files/en-us/web/mathml/examples/index.md
@@ -33,5 +33,5 @@ The following demos mix MathML with other Web technologies to produce advanced c
   - : A greek article about the Riemann zeta function, with [Web fonts](/en-US/docs/Learn/CSS/Styling_text/Web_fonts) from the [Greek Font Society](https://greekfontsociety-gfs.gr/).
 - [Pell's equation](https://people.igalia.com/fwang/pell-bigint-mathml/)
   - : A JavaScript program to solve Pell's equation using [`BigInt`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt).
-- [Lovelace's program for Bernouilli numbers](https://people.igalia.com/fwang/lovelace-jsclass-mathml/)
-  - : An emulator for Ada Lovelace's program to calculate Bernouilli numbers, using [Private properties](/en-US/docs/Web/JavaScript/Reference/Classes/Private_properties).
+- [Lovelace's program for Bernoulli numbers](https://people.igalia.com/fwang/lovelace-jsclass-mathml/)
+  - : An emulator for Ada Lovelace's program to calculate Bernoulli numbers, using [Private properties](/en-US/docs/Web/JavaScript/Reference/Classes/Private_properties).
diff --git a/files/en-us/web/media/dash_adaptive_streaming_for_html_5_video/index.md b/files/en-us/web/media/dash_adaptive_streaming_for_html_5_video/index.md
index 15cabbf48cec187..1dc4babffa3d1b6 100644
--- a/files/en-us/web/media/dash_adaptive_streaming_for_html_5_video/index.md
+++ b/files/en-us/web/media/dash_adaptive_streaming_for_html_5_video/index.md
@@ -16,13 +16,13 @@ Firefox 23 removed support for DASH for HTML WebM video. It will be replaced by
 
 ## Using DASH - Server Side
 
-First you'll need to convert your WebM video to a DASH manifest with the accompanying video files in various bit rates. To start with you'll only need the ffpmeg program from [ffmpeg.org](https://www.ffmpeg.org/), with libvpx and libvorbis support for WebM video and audio, at least version 2.5 (probably; this was tested with 3.2.5).
+First you'll need to convert your WebM video to a DASH manifest with the accompanying video files in various bit rates. To start with you'll only need the FFmpeg program from [ffmpeg.org](https://www.ffmpeg.org/), with libvpx and libvorbis support for WebM video and audio, at least version 2.5 (probably; this was tested with 3.2.5).
 
 ### 1. Use your existing WebM file to create one audio file and multiple video files
 
 For example:
 
-The file **_in.video_** can be any container with at least one audio and one video stream that can be decoded by ffmpeg,
+The file **_in.video_** can be any container with at least one audio and one video stream that can be decoded by FFmpeg,
 
 Create the audio using:
 
diff --git a/files/en-us/web/media/formats/audio_codecs/index.md b/files/en-us/web/media/formats/audio_codecs/index.md
index a18d8051f04fdea..8c4f617a1ed0818 100644
--- a/files/en-us/web/media/formats/audio_codecs/index.md
+++ b/files/en-us/web/media/formats/audio_codecs/index.md
@@ -546,7 +546,7 @@ As a speech-specific codec, AMR is essentially useless for any other content, in
       Supported bit rates
       
         Half Rate (HR) and Full Rate (FR): 1.8 kbps, 4.75 kbps,
-        5.15 kbpz, 5.9 kbps, 6.7 kbps, 7.4 kbps, 7.95 kbps
+        5.15 kbps, 5.9 kbps, 6.7 kbps, 7.4 kbps, 7.95 kbps
       
     
     
diff --git a/files/en-us/web/media/formats/video_codecs/index.md b/files/en-us/web/media/formats/video_codecs/index.md
index 6ec1c901b71a809..f2cd07a8f19eddf 100644
--- a/files/en-us/web/media/formats/video_codecs/index.md
+++ b/files/en-us/web/media/formats/video_codecs/index.md
@@ -811,7 +811,7 @@ H.263 is a proprietary format, with [patents](https://www.itu.int/ITU-T/recommen
   
     
       Supported bit rates
-      Unrestricted, but typically below 64 Kbps
+      Unrestricted, but typically below 64 kbps
     
     
       Supported frame rates
@@ -930,7 +930,7 @@ HEVC is a proprietary format and is covered by a number of patents. Licensing is
   
     
       Supported bit rates
-      Up to 800,000 Kbps
+      Up to 800,000 kbps
     
     
       Supported frame rates
@@ -1113,7 +1113,7 @@ You almost certainly don't want to use this format, since it isn't supported in
   
     
       Supported bit rates
-      5 Kbps to 1 Gbps and more
+      5 kbps to 1 Gbps and more
     
     
       Supported frame rates
diff --git a/files/en-us/web/performance/understanding_latency/index.md b/files/en-us/web/performance/understanding_latency/index.md
index 5c3eda7f0414e21..179fb632808f022 100644
--- a/files/en-us/web/performance/understanding_latency/index.md
+++ b/files/en-us/web/performance/understanding_latency/index.md
@@ -30,11 +30,11 @@ In the developer tools, under the network table, you can switch the throttling o
 
 | Selection      | Download speed | Upload speed | Minimum latency (ms) |
 | -------------- | -------------- | ------------ | -------------------- |
-| GPRS           | 50 Kbps        | 20 Kbps      | 500                  |
-| Regular 2G     | 250 Kbps       | 50 Kbps      | 300                  |
-| Good 2G        | 450 Kbps       | 150 Kbps     | 150                  |
-| Regular 3G     | 750 Kbps       | 250 Kbps     | 100                  |
-| Good 3G        | 1.5 Mbps       | 750 Kbps     | 40                   |
+| GPRS           | 50 kbps        | 20 kbps      | 500                  |
+| Regular 2G     | 250 kbps       | 50 kbps      | 300                  |
+| Good 2G        | 450 kbps       | 150 kbps     | 150                  |
+| Regular 3G     | 750 kbps       | 250 kbps     | 100                  |
+| Good 3G        | 1.5 Mbps       | 750 kbps     | 40                   |
 | Regular 4G/LTE | 4 Mbps         | 3 Mbps       | 20                   |
 | DSL            | 2 Mbps         | 1 Mbps       | 5                    |
 | Wi-Fi          | 30 Mbps        | 15 Mbps      | 2                    |
diff --git a/files/en-us/web/privacy/third-party_cookies/index.md b/files/en-us/web/privacy/third-party_cookies/index.md
index 394fdea9285310a..9463cdd2b071e9a 100644
--- a/files/en-us/web/privacy/third-party_cookies/index.md
+++ b/files/en-us/web/privacy/third-party_cookies/index.md
@@ -44,9 +44,9 @@ Each of the three sites has an embedded sign-in widget, hosted at `auth.site`, t
 
 ## What is the problem with third-party cookies?
 
-The above use cases sound innocent enough. However, third-party cookies can also be used for illegimitate purposes without the user's consent, which are technically undistinguishable from valid use cases.
+The above use cases sound innocent enough. However, third-party cookies can also be used for illegitimate purposes without the user's consent, which are technically undistinguishable from valid use cases.
 
-Following a link to a third-party or interacting with third-party content embeded in an `