[Pas2js] TStrings.LoadFromStream in pas2js RTL.

Michael Van Canneyt michael at freepascal.org
Thu Aug 27 15:06:09 CEST 2020


Hi,

I've added a LoadFromURL() to TStrings and TMemoryStream, and a
delphi-compatible LoadFromFile() which simply loads from an URL.

It is possible to load synchronously (for as long as browser will still
support this in the XMLHTTPRequest) but it is better to load asynchronously.


The support for this is pluggable because it differs depending on which environment
you code for: NodeJS or Browser. If you use the browserapp or browserconsole
units, then the support for the browser is automatically included. 
If you don't use either of these units, include the 
Rtl.BrowserLoadHelper
unit, it will activate the support for LoadFromUTL.

I still need to code support for nodejs, but that should be fairly trivial.

Michael.


More information about the Pas2js mailing list