question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Convert examples/image_decoders/jpeg_viewer.js to await/async

See original GitHub issue

Please do not work on this issue unless you have applied to the outreachy project.

The jpeg_viewer.js example currently uses the older style of promise.then and callbacks. Convert it to use an async function and await style.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
brendandahlcommented, Oct 19, 2021

That’d be a good update, feel free to open a PR.

0reactions
stbensonimohcommented, Oct 19, 2021

@brendandahl I have just made the pull request. Please kindly reopen the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

async await in image loading - javascript - Stack Overflow
Your problem here extends from the definition for await ... The await operator is used to wait for a Promise. The Image.prototype.onload ...
Read more >
Async image loading, and CORS / Sylvain Lesage - Observable
this function returns a Promise, making it easier to manage the event: just await for the image; not sure it changes anything in...
Read more >
Node.js Express Project to Encode & Decode Images From ...
Node. js Express Project to Encode & Decode Images From Local PC or URL to Base64 Code in JS ... [ Javascript Fetch...
Read more >
Improved Async Image Loading and Decoding - YouTube
This video explains the process of image eager and lazy loading followed by the decoding process and how you can make your web...
Read more >
Image loading with image.decode() | by Stephan Köpp | DailyJS
We only shift the insertion of the image into the DOM to a callback. So appending the image to the DOM still causes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found