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
docs: change examples in docs to use for..of and async/await (#14842) #15196
Conversation
💖 Thanks for opening this pull request! 💖 We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of commit messages with semantic prefixes:
Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
}).then(function () { | ||
}); | ||
|
||
(async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this example would be a little more clear if we made this a named async function instead of an IIFE. Thoughts? 💭
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure that would be better. Will update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we use async/await elsewhere, I'd be 👍 for this change
docs/api/desktop-capturer.md
Outdated
maxWidth: 1280, | ||
minHeight: 720, | ||
maxHeight: 720 | ||
for (const source in sources) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the PR title, I assume this should be of
:)
for (const source in sources) { | |
for (const source of sources) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops!
Release Notes Persisted
|
Congrats on merging your first pull request! 🎉🎉🎉 |
Thanks @AbhilashJN! |
Description of Change
Changed code examples in desktop-capturer.md and using-selenium-and-webdriver.md to use for..of and async/await instead of normal for loop and Promises.
CC @ckerr @codebytere
Checklist
Release Notes
Notes: docs: update some examples in documentation to use async/await and for..of