Delphi TChromium CEF3运行时导致浏览器加载页面不正确



我正在使用TChromium进行授权。我有变量Chromium1: TChromium;。我需要破坏铬的形式隐藏和显示形式显示。(因为铬有时会引发异常"模块libcef.dll中的EExternal exception"并使我的应用程序崩溃,我认为铬的破坏在没有使用时会有所帮助)。我:

procedure TAuthForm.FormShow(Sender: TObject);
begin
  Chromium1 := TChromium.Create(self);
  Chromium1.Align := alClient;
  Chromium1.OnJsdialog := Chromium1Jsdialog;
  Chromium1.OnBeforePopup := Chromium1BeforePopup;
  Chromium1.DefaultUrl := 'about:blank';
  Chromium1.Parent := Self;
  Chromium1.Load(AUTH_URL);
end;
procedure TAuthForm.FormHide(Sender: TObject);
begin
  Chromium1.Free;
end;

问题是,当TAuthForm.FormShow首先调用时,页面加载正确,但当我隐藏表单并再次显示它时浏览器显示页面不正确,现在如何解释这里是http://google.com/的一个例子:

Google(function(){ window.google={kEI:"oKRKUZ2iHafP4QTXwYCwDw",getEI:function(a)    {for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return b||google.kEI},https:function(){return"https:"==window.location.protocol},kEXPI:"17259,39523,4000116,4001076,4001568,4001948,4001959,4001975,4002562,4002734,4002855,4003178,4003387,4003495,4003917,4004181,4004213,4004257,4004334,4004340,4004479,4004652,4004653,4004697,4004730,4004755,4004759,4004766,4004898,4004905,4004949,4004953,4005154",kCSI:{e:"17259,39523,4000116,4001076,4001568,4001948,4001959,4001975,4002562,4002734,4002855,4003178,4003387,4003495,4003917,4004181,4004213,4004257,4004334,4004340,4004479,4004652,4004653,4004697,4004730,4004755,4004759,4004766,4004898,4004905,4004949,4004953,4005154",ei:"oKRKUZ2iHafP4QTXwYCwDw"},authuser:0,ml:function(){},pageState:"#",kHL:"ru",time:function(){return(new Date).getTime()},log:function(a, b,c,h){var d=new Image,f=google.lc,e=google.li,g="";d.onerror=d.onload=d.onabort=function(){delete f[e]};f[e]=d;!c&&-1==b.search("&ei=")&&(g="&ei="+google.getEI(h));c=c||"/gen_204?........

它显示了所有块的内容,包括<title><script>,您可以在这里看到…

我试图找到解决方案,但发现只有相同的错误(我的意思是libcef.dll异常没有解决方案),这里:https://stackoverflow.com/questions/13784792/cef3-application-crash-fault-module-kernelbase-dll在评论…

是PBM它会破坏你的chrom实例,这样你就不能再看到它了

just do:

铬。可见:= false;//如果你想隐藏它

相关内容

  • 没有找到相关文章

最新更新