Gecko XPCOM用法与WebKit

Dej*_*ell 3 c++ delphi gecko webkit

我需要在C++应用程序中嵌入一个Web浏览器.同样,我需要从Delphi组件中获取其javascript方法.

我知道对于FF,有一个Gecko和XPCOM.WebKit有这样的东西吗?

pla*_*aes 7

WebKit第一个:有一个名为Chromium的项目嵌入式(Chromium基本上是WebKit渲染引擎和V8 Javascript引擎),这也得到了Delphi的支持.快速查看标题后,我没有找到访问JS方法的方法,但它允许在给定的框架中执行javascript片段:

// Execute a string of JavaScript code in this frame. The |script_url|
// parameter is the URL where the script in question can be found, if any. The
// renderer may request this URL to show the developer the source of the
// error.  The |start_line| parameter is the base line number to use for error
// reporting.
execute_java_script: procedure(self: PCefFrame; const jsCode, scriptUrl: PWideChar; startLine: Integer); stdcall;
Run Code Online (Sandbox Code Playgroud)

那些碎片就在那里,你只需要弄清楚如何将它们拼凑在一起.

对于Gecko,在名为d-gecko的项目下可以使用Delphi绑定.但它似乎有点过时,似乎也不允许访问Javascript.