Skip to content

Commit d71c12f

Browse files
Fix bug in example code (mdn#40556)
* Update index.md * Fix more --------- Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
1 parent 1b61fe3 commit d71c12f

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

files/en-us/web/api/media_capabilities_api/using_the_media_capabilities_api/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ The error can be due to the `type` not being one of the two possible values, the
112112
```js
113113
navigator.mediaCapabilities
114114
.decodingInfo(videoConfiguration)
115-
.then(console.log("It worked"))
115+
.then(() => console.log("It worked"))
116116
.catch((error) => console.error(`It failed: ${error}`));
117117
```
118118

files/en-us/web/api/sharedstorage/append/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ A {{jsxref("Promise")}} that fulfills with `undefined`.
4848
```js
4949
window.sharedStorage
5050
.append("integer-list", ",9")
51-
.then(console.log("Value appended to integer list"));
51+
.then(() => console.log("Value appended to integer list"));
5252
```
5353

5454
## Specifications

files/en-us/web/api/sharedstorage/clear/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ A {{jsxref("Promise")}} that fulfills with `undefined`.
3939
## Examples
4040

4141
```js
42-
window.sharedStorage.clear().then(console.log("Shared storage cleared"));
42+
window.sharedStorage.clear().then(() => console.log("Shared storage cleared"));
4343
```
4444

4545
## Specifications

files/en-us/web/api/sharedstorage/delete/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ A {{jsxref("Promise")}} that fulfills with `undefined`.
4747
```js
4848
window.sharedStorage
4949
.delete("ab-testing-group")
50-
.then(console.log("Value deleted"));
50+
.then(() => console.log("Value deleted"));
5151
```
5252

5353
## Specifications

files/en-us/web/api/sharedstorage/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The **`SharedStorage`** interface of the {{domxref("Shared Storage API", "Shared
3434
```js
3535
window.sharedStorage
3636
.set("ab-testing-group", "0")
37-
.then(console.log("Value saved to shared storage"));
37+
.then(() => console.log("Value saved to shared storage"));
3838
```
3939

4040
## Specifications

files/en-us/web/api/sharedstorage/set/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ window.sharedStorage
5252
.set("ab-testing-group", "0", {
5353
ignoreIfPresent: true,
5454
})
55-
.then(console.log("Set operation completed"));
55+
.then(() => console.log("Set operation completed"));
5656
```
5757

5858
## Specifications

files/en-us/web/api/window/sharedstorage/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ A {{domxref("WindowSharedStorage")}} object instance.
2424
```js
2525
window.sharedStorage
2626
.set("ab-testing-group", "0")
27-
.then(console.log("Value saved to shared storage"));
27+
.then(() => console.log("Value saved to shared storage"));
2828
```
2929

3030
## Specifications

0 commit comments

Comments
 (0)