GTUTO
https://www.gtuto.com/javascript-promise/
Export date: Fri Apr 26 15:54:46 2024 / +0000 GMT

javascript promise


Méthode pour exécuter du code asynchrone

Clique sur bouton -> testPromise()
Création objet p1 new Promise -> function(resolve, reject) en asynchrone
p1.then est appelé par resolve('truc en retour')
p1.then().catch() est appelé par reject('un autre truc en retour')

http://www.html5rocks.com/en/tutorials/es6/promises/
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Promise
Post date: 2016-02-06 14:02:17
Post date GMT: 2016-02-06 14:02:17

Post modified date: 2016-02-06 17:28:14
Post modified date GMT: 2016-02-06 17:28:14

Export date: Fri Apr 26 15:54:46 2024 / +0000 GMT
This page was exported from GTUTO [ https://www.gtuto.com ]
Export of Post and Page has been powered by [ Universal Post Manager ] plugin from www.ProfProjects.com