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.

Patch all browsers API returning Promise

See original GitHub issue

All browsers API returning Promise should be patched.

This is required because the returned Promises would not extend the monkey-patched Promise by default.

It seems like patching might not be needed when microtasks are not used (the monkey patch on the Promise.prototype is taken into account on latest Chrome version (44) but it fails on earlier version. It should probably be tested when other browsers implement the API before we remove the patch on zone.js - we must keep it for zone-microtask.js)

ref:

  • fetch() has been patched in #119
  • idl can be download via the script in #118

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
maliksahilcommented, Jul 31, 2016

This is causing a lot of headache. I wish we could use promises or apis that use promises without having to think about it.

0reactions
angular-automatic-lock-bot[bot]commented, Nov 20, 2020

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Patch all browsers API returning Promise #31762 - GitHub
All browsers API returning Promise should be patched. This is required because the returned Promises would not extend the monkey-patched Promise ...
Read more >
Promise.all() - JavaScript - MDN Web Docs
The Promise.all() method takes an iterable of promises as input and returns a single Promise. This returned promise fulfills when all of the ......
Read more >
Native JavaScript Promises and Browser APIs - Blog - fuqua.io
In JavaScript Promise parlance, returning a value is known as resolving and encountering an error is known as rejecting. When we construct a...
Read more >
How to make HTTP requests using Fetch API and Promises
When making an HTTP request as an asynchronous operation, fetch will not return any data. However it will return a response promise.
Read more >
How to Perform HTTP Requests with Axios – A Complete Guide
Axios is a promise-based HTTP client for Node.js and the browser. ... To obtain the response and catch any errors, we must utilize...
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