pas2js/demo/rtl
2023-12-03 13:17:01 +01:00
..
ajax.pas * Initial import 2017-12-16 14:45:10 +00:00
bytes.txt Demo for LoadFromURL for TMemoryStream 2020-08-14 09:24:11 +00:00
countries.json * Initial import 2017-12-16 14:45:10 +00:00
demo_njsprocess.pas * Initial import 2017-12-16 14:45:10 +00:00
demoajax.html * Initial import 2017-12-16 14:45:10 +00:00
demoajax.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
demoajax.lpr * Initial import 2017-12-16 14:45:10 +00:00
demobrowserconsole.html * Initial import 2017-12-16 14:45:10 +00:00
demobrowserconsole.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
demobrowserconsole.lpr * Initial import 2017-12-16 14:45:10 +00:00
democanvas2d.html * Initial import 2017-12-16 14:45:10 +00:00
democanvas2d.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
democanvas2d.pas * Make 2 demos use the new unit names 2023-12-03 13:17:01 +01:00
democlasstopas.html * Improved demo for classtopas 2020-05-08 12:45:24 +00:00
democlasstopas.lpi * Improved demo for classtopas 2020-05-08 12:45:24 +00:00
democlasstopas.pas * Make 2 demos use the new unit names 2023-12-03 13:17:01 +01:00
democollection.html * Initial import 2017-12-16 14:45:10 +00:00
democollection.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
democollection.pas * Convert to webproject, demo enumerator for collection and stringlist 2017-12-27 10:54:29 +00:00
democomponents.html * For in loop, converted to web project 2017-12-27 11:07:20 +00:00
democomponents.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
democomponents.lpr * For in loop, converted to web project 2017-12-27 11:07:20 +00:00
demodatetime.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
demodatetime.pas rtl: added JSDelete 2018-06-14 13:54:31 +00:00
demodocument1.html * Initial import 2017-12-16 14:45:10 +00:00
demodocument1.pas * Initial import 2017-12-16 14:45:10 +00:00
demodombuttonevent.html * Initial import 2017-12-16 14:45:10 +00:00
demodombuttonevent.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
demodombuttonevent.pas * Initial import 2017-12-16 14:45:10 +00:00
demojsarray.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
demojsarray.pas * Initial import 2017-12-16 14:45:10 +00:00
demojsdataarray.pas * Initial import 2017-12-16 14:45:10 +00:00
demojsregexp.pas * Initial import 2017-12-16 14:45:10 +00:00
demojsstring.pas * Initial import 2017-12-16 14:45:10 +00:00
demoloadstreamfromurl.html * Small fixes and demo for TStrings.LoadFromURL 2020-08-14 09:46:52 +00:00
demoloadstreamfromurl.lpi Demo for LoadFromURL for TMemoryStream 2020-08-14 09:24:11 +00:00
demoloadstreamfromurl.lpr * Small fixes and demo for TStrings.LoadFromURL 2020-08-14 09:46:52 +00:00
demoloadstringsfromurl.html * Small fixes and demo for TStrings.LoadFromURL 2020-08-14 09:46:52 +00:00
demoloadstringsfromurl.lpi * Small fixes and demo for TStrings.LoadFromURL 2020-08-14 09:46:52 +00:00
demoloadstringsfromurl.lpr * Small fixes and demo for TStrings.LoadFromURL 2020-08-14 09:46:52 +00:00
demonew.html * Initial import 2017-12-16 14:45:10 +00:00
demonew.pas * Initial import 2017-12-16 14:45:10 +00:00
demonodecmdlineoptions.lpi * Node command-line demos 2020-02-21 15:14:03 +00:00
demonodecmdlineoptions.pas * Node command-line demos 2020-02-21 15:14:03 +00:00
demoreadfileinput.html Add missing constructors for TJSBlob and TJSHTMLFile, add a demo for their usage 2023-08-28 11:02:29 +07:00
demoreadfileinput.lpi Add missing constructors for TJSBlob and TJSHTMLFile, add a demo for their usage 2023-08-28 11:02:29 +07:00
demoreadfileinput.lpr Add missing constructors for TJSBlob and TJSHTMLFile, add a demo for their usage 2023-08-28 11:02:29 +07:00
demorouter.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
demorouter.pas demos: updated for Laz 2.0 2019-03-11 10:16:12 +00:00
demortti.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
demortti.pas typinfo: added GetStrProp, SetStrProp, GetOrdProp, SetStrProp 2018-06-05 22:17:12 +00:00
demostringlist.html * Convert to webproject, demo enumerator for collection and stringlist 2017-12-27 10:54:29 +00:00
demostringlist.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
demostringlist.pas * Convert to webproject, demo enumerator for collection and stringlist 2017-12-27 10:54:29 +00:00
demouncaughtexception.html * Initial import 2017-12-16 14:45:10 +00:00
demouncaughtexception.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
demouncaughtexception.pas * Initial import 2017-12-16 14:45:10 +00:00
demoxhr.html * Initial import 2017-12-16 14:45:10 +00:00
demoxhr.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
demoxhr.lpr demo: fixed demoxhr, issue 34980 2019-01-31 16:16:51 +00:00
README.md * Initial import 2017-12-16 14:45:10 +00:00
rtl_demos.lpg * WASI runtime embedding 2021-12-24 14:02:56 +01:00

Simple demos for the RTL units

Compiling for running in node.js:

pas2js -Tnodejs -Jirtl.js demojsstring.pas
pas2js -Tnodejs -Jirtl.js demojsregexp.pas
pas2js -Tnodejs -Jirtl.js democollection.pas
pas2js -Tnodejs -Jirtl.js democomponents.lpr
pas2js -Tnodejs -Jirtl.js demostringlist.pas
pas2js -Tnodejs -Jirtl.js demo_njsprocess.pas

Compiling for running in a browser:

pas2js -Jc -Jirtl.js demodombuttonevent.pas
pas2js -Jc -Jirtl.js demodocument1.pas
pas2js -Jc -Jirtl.js democollection.pas
pas2js -Jc -Jirtl.js democomponents.lpr
pas2js -Jc -Jirtl.js demoajax.pas
pas2js -Jc -Jirtl.js democanvas2d.pas
pas2js -Jc -Jirtl.js demonew.pas
pas2js -Jc -Jirtl.js democlasstopas.pas
pas2js -Jc -Jirtl.js demodocument1.pas
pas2js -Jc -Jirtl.js demouncaughtexception.pas
pas2js -Jc -Jirtl.js demoxhr.lpr
pas2js -Jc -Jirtl.js dembrowserconsole.lpr

When using lazarus, you can also open the respective .lpi files, and compile your project. Make sure pas2js is in your path, or the IDE will not find it.

Run in node.js

To run the code, you need to run

nodejs demojsstring.js
nodejs demojsregexp.js

etc.

Run/Show in a browser.

Some of the projects can be run straight from file. Just open the file in the explorer using your favourite browser.

The ajax demo needs to be run from a webserver, just as the demoxhr demo.

One way to do so, is to compile the simpleserver example program from the fcl-web examples, and run it in this directory. Then point your browser to http://localhost:3000/ajaxdemo.html.