-
Notifications
You must be signed in to change notification settings - Fork 512
Add examples for async iterators and generators. #1036
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
Conversation
💖 Thanks for opening this pull request! 💖
|
Is there anything I can do to move this forward? |
@wbamberg — flagging this one. |
Hey @jpmedley Thanks for your pull request. Apologies for how long it has taken for someone to take a look at it. Couple of items You will need to add the following entries to the
The following the general file naming conventions, and specifically the one's in this folder. I would change the filenames to the following:
With the above you can test these examples locally by running For the for-in example specifically, I get the following output when running the example:
Perhaps that is the intended output? I would recommend adding a comment to each |
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.
See comment here #1036 (comment) with requested changes.
PTAL |
Now PTAL. |
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.
@jpmedley One small typo, other than that, this works great! Thanks! r+w/c
<code id="static-js" data-height="taller">async function* randomNumbers() { | ||
const url = 'https://www.random.org/decimal-fractions/?num=1&dec=10&col=1&format=plain&rnd=new'; | ||
|
||
console.log("Print randomly generated numbers until reset is clicked the random number exceeds 0.95."); |
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.
Looks to be a small typo here:
"Print randomly generated numbers until reset is clicked the random number exceeds 0.95."
to
"Print randomly generated numbers until reset is clicked, (or) the random number exceeds 0.95."
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.
@jpmedley No worries, let me fix that one, and merge. Thanks again for your contribution.
Small typo fix
Congrats on merging your first pull request! 🎉🎉🎉 |
* upstream/master: (47 commits) Revert "Use semicolon in inlined perf code" (mdn#1105) chore(community): add @jpmedley as a contributor (mdn#1104) Add examples for async iterators and generators. (mdn#1036) Use semicolon in inlined perf code (mdn#1103) Add String concat, ends/startswith, padend/start live examples (mdn#1068) chore(deps): update dependency eslint to v5.3.0 (mdn#1094) chore(deps): update dependency all-contributors-cli to v5.4.0 (mdn#1089) Use CC0 images in <picture> example (mdn#1086) chore(deps): update dependency clean-css to v4.2.0 (mdn#1084) chore(deps): update dependency puppeteer to v1.6.2 (mdn#1083) Make variable names consistent (mdn#1090) adding lang global attribute interactive example (mdn#1056) Add some squarish-cropped versions of some of the images. Add CC0 sample images Assorted stock images, all CC0-licensed, for use by examples. chore(deps): update dependency jest to v23.4.2 (mdn#1064) chore(deps): update dependency prettier to v1.14.0 (mdn#1066) adding spellcheckglobal attribute interactive example (mdn#1057) adding tabindex global attribute interactive example (mdn#1060) adding title global attribute interactive example (mdn#1061) adding id global attribute interactive example (mdn#1055) ...
https://www.chromestatus.com/feature/5727385018171392