Lazarus

Programming => Networking and Web Programming => Topic started by: michoux on July 08, 2020, 03:35:32 pm

Title: Invoke java script
Post by: michoux on July 08, 2020, 03:35:32 pm
Hello,

I have a web page with some javascript.
Is it possible to call some javascript code for this web page from Lazarus?
Title: Re: Invoke java script
Post by: PascalDragon on July 09, 2020, 09:22:02 am
You can either embed (https://wiki.freepascal.org/Webbrowser#Integrate_web_browser_component_in_application) a browser in your application or you essentially need to use your own JS interpreter which can be done for example by using the libsee (https://www.adaptive-enterprises.com.au/~d/software/see/) library for which headers are provided by FPC (plus a how to (https://www.freepascal.org/~michael/articles/libsee/libsee.pdf)) or you can use the full Pascal JS engine BESEN (https://github.com/BeRo1985/besen).
Title: Re: Invoke java script
Post by: yus on July 09, 2020, 09:00:57 pm
I know that it is possible to execute code written in python. https://wiki.freepascal.org/Using_Python_in_Lazarus_on_Windows/Linux
I also know that it is possible to execute javascript in python.

Maybe this way will help solve your problem.

I myself have not tried to do this.

If you achieve any results, it will be very interesting to know about it.  :)
TinyPortal © 2005-2018