pas2js/demo/promise
2021-12-24 14:02:56 +01:00
..
askmom.html * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
askmom.lpi demos: updates 2019-03-16 17:00:25 +00:00
askmom.pas * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
chapter-1.json * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
chapter-2.json * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
chapter-3.json * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
chapter-4.json * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
chapter-5.json * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
demoall.html * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
demoall.lpi demos: updates 2019-03-16 17:00:25 +00:00
demoall.lpr * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
promise_demos.lpg * WASI runtime embedding 2021-12-24 14:02:56 +01:00
readme.md * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
story2.html * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
story2.lpi demos: updates 2019-03-16 17:02:39 +00:00
story2.lpr * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
story3.html * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
story3.lpi demos: updates 2019-03-16 17:02:39 +00:00
story3.lpr * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
story.html * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
story.json * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
story.lpi demos: updates 2019-03-16 17:02:39 +00:00
story.lpr * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
styles.css * Corrected promise object, added examples 2018-02-04 16:41:39 +00:00
utils.pp demo: fixed compile, issue 34963 2019-01-28 08:03:23 +00:00

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()