Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: syntax errors in JS example sections (v4) #18424

Merged
merged 12 commits into from
Jul 17, 2022

Conversation

lionralfs
Copy link
Contributor

@lionralfs lionralfs commented Jul 16, 2022

Summary

Followup to PR #18186, #18191 and #18307


Skipped issues (POTENTIALLY OUTDATED, SEE #18186 (comment)):

This PR…
-->

  • Adds a new document
  • Rewrites (or significantly expands) a document
  • Fixes a typo, bug, or other error

@github-actions github-actions bot added the Content:WebAPI Web API docs label Jul 16, 2022
@github-actions

This comment was marked as resolved.

Copy link
Contributor

@teoli2003 teoli2003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, a few nits.

files/en-us/web/api/mediastreamtrack/mute_event/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/mediastreamtrack/unmute_event/index.md Outdated Show resolved Hide resolved
@@ -56,9 +56,8 @@ to the video element referenced by the variable `videoElem`.
async function capture() {
let supportedConstraints = navigator.mediaDevices.getSupportedConstraints();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let supportedConstraints = navigator.mediaDevices.getSupportedConstraints();
const supportedConstraints = navigator.mediaDevices.getSupportedConstraints();

files/en-us/web/api/htmlmediaelement/controller/index.md Outdated Show resolved Hide resolved
Comment on lines 24 to 26
```
...
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```
...
```

files/en-us/web/api/htmlmediaelement/mediagroup/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/htmlmediaelement/mediagroup/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/idbtransaction/commit/index.md Outdated Show resolved Hide resolved
@lionralfs lionralfs marked this pull request as ready for review July 16, 2022 20:26
@lionralfs lionralfs requested a review from a team as a code owner July 16, 2022 20:26
@lionralfs lionralfs requested review from sideshowbarker and teoli2003 and removed request for a team July 16, 2022 20:26
Copy link
Contributor

@teoli2003 teoli2003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few details, and I can't merge this tomorrow when I wake up 😄

Well done! Our code examples are getting much better: better readability, better code&paste, … There still is a lot of work to do, but we are moving in the right direction. Thank you!

files/en-us/web/api/history_api/example/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/history_api/example/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/history_api/example/index.md Outdated Show resolved Hide resolved
@@ -37,7 +37,7 @@ This proprietary method is specific to Internet Explorer.

## Example

```js
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this Typescript? Same for next interface. I'm wondering should these be here as it's not really a example but just typing for this event.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is WebIDL, this is likely the only place this WebIDL is stored nowadays.

@sideshowbarker sideshowbarker removed their request for review July 17, 2022 00:11
Copy link
Contributor

@teoli2003 teoli2003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@teoli2003 teoli2003 merged commit 9631a11 into mdn:main Jul 17, 2022
@lionralfs lionralfs deleted the fix-js-example-syntax-errors-4 branch July 17, 2022 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants