Michaël Van Canneyt 2626eef7c3 * WASI runtime embedding 3 năm trước cách đây
..
askmom.html c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
askmom.lpi 6d6ebaa8e6 demos: updates 6 năm trước cách đây
askmom.pas c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
chapter-1.json c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
chapter-2.json c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
chapter-3.json c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
chapter-4.json c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
chapter-5.json c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
demoall.html c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
demoall.lpi 6d6ebaa8e6 demos: updates 6 năm trước cách đây
demoall.lpr c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
promise_demos.lpg 2626eef7c3 * WASI runtime embedding 3 năm trước cách đây
readme.md c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
story.html c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
story.json c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
story.lpi 002076a599 demos: updates 6 năm trước cách đây
story.lpr c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
story2.html c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
story2.lpi 002076a599 demos: updates 6 năm trước cách đây
story2.lpr c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
story3.html c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
story3.lpi 002076a599 demos: updates 6 năm trước cách đây
story3.lpr c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
styles.css c9c60fe061 * Corrected promise object, added examples 7 năm trước cách đây
utils.pp ce04b7c283 demo: fixed compile, issue 34963 6 năm trước cách đây

readme.md

This directory contains several examples of Javascript Promise support

The askmom example is a basic example, translated from:

https://scotch.io/tutorials/javascript-promises-for-dummies

The demoall example contains some sample code found on the MDN website: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all

The "story" examples are translated from the examples found on: https://developers.google.com/web/fundamentals/primers/promises

To run these samples, first compile them using lazarus. For the story samples, it is best to start a simple webserver in this directory:

simpleserver

then point your browser at http://localhost:3000/story.html http://localhost:3000/story2.html http://localhost:3000/story3.html

The other examples can of course also be showed in this manner: http://localhost:3000/demoall.html http://localhost:3000/askmom.html

It is best to open the developer console for these examples, since some of the logging happens with console.log()