TTMSFMXWebBrowser after rendering

With the following code, you are able to detect when a page is loaded, for Windows. For the other platforms, more investigation is needed.




function TForm62.ReadyState: string;
var
  pDoc: IHTMLDocument2;
  ie: IWebBrowser2;
begin
  Result := '';
  ie := IWebBrowser2(TMSFMXWebBrowser1.GetWebBrowserInstance);
  if Assigned(ie) and Assigned(ie.Document) then
  begin
    pDoc := ie.Document as IHtmlDocument2;
    Result := pDoc.readyState;
  end;
end;