pas2js/demo/rtl
2023-12-03 13:17:01 +01:00
..
ajax.pas
bytes.txt Demo for LoadFromURL for TMemoryStream 2020-08-14 09:24:11 +00:00
countries.json
demo_njsprocess.pas
demoajax.html
demoajax.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
demoajax.lpr
demobrowserconsole.html
demobrowserconsole.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
demobrowserconsole.lpr
democanvas2d.html
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
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
demodocument1.pas
demodombuttonevent.html
demodombuttonevent.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
demodombuttonevent.pas
demojsarray.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
demojsarray.pas
demojsdataarray.pas
demojsregexp.pas
demojsstring.pas
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
demonew.pas
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
demouncaughtexception.lpi demo: rtl: set all lpi to compatibility mode 2019-03-16 11:59:55 +00:00
demouncaughtexception.pas
demoxhr.html
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
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.