113 matching pages, found in 40 ms

Ask StyxWritten on your GPU machine; takes a few seconds the first time.

  1. web.devhttps://web.dev › articles › promises
    More about web.dev
    JavaScript promises: An introduction | Articles | web.dev

    Dec 16, 2013. … the same issues. Although promise implementations follow a standardized behaviour, their overall APIs differ. JavaScript promises are similar in API to RSVP.js. Here's how you create a promise: var promise = new Promise …

    0 points
  2. web.devhttps://web.dev › articles › async-functions
    More about web.dev
    Async functions: Making promises friendly | Articles | web.dev

    Oct 20, 2016. … When you await a promise, the function is paused in a non-blocking way until the promise settles. If the promise fulfills, you get the value back. If the promise rejects, the …

    0 points
  3. web.devhttps://web.dev › articles › introduction-to-fetch
    More about web.dev
    Introduction to fetch() | Articles | web.dev

    Mar 10, 2015. … returns either a resolved Promise as Promise.resolve() , or a rejected Promise as Promise.reject() . This is the first method called in the fetch() chain. If the Promise resolves, the script then calls the …

    0 points
  4. web.devhttps://web.dev › articles › push-notifications-handling-me…
    More about web.dev
    Push events | Articles | web.dev

    Jun 30, 2016. … done by combining these promises with Promise.all() . The resulting promise is passed into event.waitUntil() meaning the browser will wait until both promises have finished before checking that a notification has been displayed …

    0 points
  5. web.devhttps://web.dev › blog › promise-try-baseline
    More about web.dev
    Promise.try is now Baseline Newly available | Articles | web.dev

    Jan 17, 2025. … be caught here: new Promise ( resolve = > resolve ( callback ()); // But it will be here: Promise . try ( callback ); Then, using the then , catch , and finally methods, handle the resolution or rejection of a Promise …

    0 points
  6. web.devhttps://web.dev › articles › porting-libusb-to-webusb
    More about web.dev
    Porting USB applications to the web. Part 1: libusb | Articles | web.dev

    Jan 20, 2022. Skip to main content English Deutsch Español – América Latina Français Indonesia Italiano Polski Português – Brasil Tiếng Việt Türkçe Русский עברית العربيّة فارسی हिंदी বাংলা ภาษาไทย 中文 – 简体 中文 – 繁體 日本語 …

    0 points
  7. web.devhttps://web.dev › articles › orchestrating-payment-transact…
    More about web.dev
    Orchestrating payment transactions with a service worker | web.dev

    Aug 31, 2020. … polyfill to resolve a promise at arbitrary timing. class PromiseResolver { constructor () { this . promise_ = new Promise (( resolve , reject ) = > { this . resolve_ = resolve ; this . reject_ = reject ; }) } get promise () { return this . promise_ } get resolve () { return this …

    0 points
  8. web.devhttps://web.dev › articles › offline-cookbook
    More about web.dev
    Common techniques to build offline applications | web.dev

    Dec 9, 2014. … etc. ]); }), ); }); event.waitUntil takes a promise to define the length and success of the install. If the promise rejects, the installation is considered a failure and this Service Worker is abandoned (if an …

    0 points
  9. web.devhttps://web.dev › articles › streams
    More about web.dev
    Streams — The definitive guide | Articles | web.dev

    Feb 19, 2021. Skip to main content English Deutsch Español Español – América Latina Français Indonesia Italiano Polski Português – Brasil Tiếng Việt Türkçe Русский עברית العربيّة فارسی हिंदी বাংলা ภาษาไทย 中文 – 简体 中文 – 繁體 …

    0 points
  10. web.devhttps://web.dev › articles › indexeddb
    More about web.dev
    Work with IndexedDB | Articles | web.dev

    Jan 15, 2024. … function useDB () { // Returns a promise, which makes `idb` usable with async-await. const dbPromise = await openDB ( 'example-database' , version , events ); } useDB (); This method returns a promise that resolves to a database object …

    0 points

Search for “Promises site:web.dev” on Google, or add !ddg, !w and other shortcuts to any search.