Page 1 of 1

JS variable access

Posted: Fri Jan 31, 2025 11:00 am
by subin
hi,
I need to access the javascript variable value. Please let me know how can i get it. Also if the OnLoadingStateChange will get triggerd when there is a change in this javascript variable or which event can use to know the js variable is changed.
thanks
Subin

Re: JS variable access

Posted: Sat Feb 01, 2025 11:19 am
by salvadordf
Read this to send information from JavaScript to Delphi :
https://stackoverflow.com/questions/64303829/how-to-invoke-the-delphi-function-from-javascript-using-cef4delphi/64304191#64304191

Read the code comments in the DOMVisitor and JSExtension demos.

I'm not a JavaScript expert but this is one result when you search "JavaScript listening variable value changed":
https://stackoverflow.com/questions/65937827/listen-to-js-variable-change