How can I access readystate value of the document?
wb.ChromiumBrowser.LoadURL('www.google.com');
while ?????? <> READYSTATE_COMPLETE do
Application.HandleMessage;
// TODO others
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
ReadyState
Re: ReadyState
Event OnLoadEnd
Code: Select all
if frame.URL = 'www.google.com' then browser.MainFrame.ExecuteJavaScript('alert("Page is load!");', '', 0);
- salvadordf
- Posts: 4575
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: ReadyState
You can use the TChromium.OnLoadEnd as Student said and you can also use the TChromium.OnLoadingStateChange event and check the "isLoading" parameter.
It's not recomended to use Application.ProcessMessages or Application.HandleMessage.
Almost all CEF events are executed in a CEF thread that it's different than the main application thread. Use synchronization objects to protect the data and send Windows messages to the main form to handle VCL controls in the main thread.
It's not recomended to use Application.ProcessMessages or Application.HandleMessage.
Almost all CEF events are executed in a CEF thread that it's different than the main application thread. Use synchronization objects to protect the data and send Windows messages to the main form to handle VCL controls in the main thread.