How do I avoid the OnDocumentComplete event for embedded iframe elements?
问题 I want to prevent iframe elements from triggering the OnDocumentComplete event every time. For example, a page has 4 iframes, and when I load this page, my OnDocumentComplete event runs 4 times. I want to run OnDocumentComplete just once for every page. How can I do that? Maybe I could remove or block iframes in TWebBrowser control. 回答1: The event OnDocumentComplete is fired for each FRAME / IFRAME in the main document. If you want to ignore them try this: procedure TForm1