问题标签 [tchromium]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
3238 浏览

delphi - 从 Chromum Embedded Framework 多次调用 OnLoadEnd

使用 CEF 浏览器,我尝试连接到 OnLoadEnd 事件以遍历 DOM 树。

出于某种奇怪的原因,我两次调用了 VisitDom。

知道为什么 OnLoadEnd 被多次调用吗?

0 投票
1 回答
4988 浏览

delphi - Delphi Chromium - 当用户单击网页中的按钮时,在 Delphi 应用程序中启动命令

我在 Delphi 应用程序中使用 Chromium 组件。

我想要以下行为:

当用户单击网页中的特定按钮时,Delphi 应用程序(“容器”)必须执行命令(使用...启动外部可执行文件)。

是否可以 ?

0 投票
2 回答
2957 浏览

delphi - Delphi Chromium 组件中的 onBeforeBrowse 事件

我正在尝试在带有 Chromium 组件(版本 306)的 Delphi XE2 中使用以下过程:

但它不起作用。Delphi 无法识别 onBeforeBrowse 事件。Chromium 似乎已正确安装,示例正在运行,我正在尝试在 GuiClient 示例中添加 onBeforeBrowse 事件处理... Delphi Chromium 组件中是否有该事件?

0 投票
1 回答
1518 浏览

delphi - How to click the Chrome Mic button from Javascript in Delphi 6 app, or at least find the button and get its Windows screen coordinates?

I have a Delphi 6 app that embeds the Chromium web browser. I want to click the Chrome microphone button (speech input control) from Javascript. I tried the usual method of calling the button's click() handler, but nothing happened. Below is the HTML I tried with the first input element being the Chrome speech input control and the second input element being a checkbox that when checked, finds the speech input control and calls its click() handler:

Is there a way to click the speech input controls microphone button from Javascript? I found another post on Stack Overflow similar to my question but there were no solutions:

Automate speech input recording in Chrome

If not, is there a way to determine from my Delphi 6 app the location of the button in Windows screen coordinates so I can move the mouse over it and click it?

I know about AutoIt from this Stack Overflow post:

Send click to google's chrome input html tag

But I want to handle the mouse click myself instead of asking my users to download and set up AutoIt.

I also want to ask if anybody knows if it is possible to call the services made available to Chrome extensions via Javascript. If that were possible, I could call the startSpeechInput() method the speech input control exposes to extensions.

0 投票
1 回答
13360 浏览

delphi - 如何在 Delphi Chromium Embedded 中按名称获取元素?

要从 TChromium 实例获取嵌入在当前 Web 文档中的特定 DOM 节点,使用其 ID,您可以使用 ICefDomDocument.getElementById()。但是如何通过 NAME 属性找到元素呢?Javascript 有 document.getElementsByName() 方法和 TWebBrowser(包装 IE)有一个类似的调用,但我不知道如何用 TChromium 做到这一点。我需要找到一些具有 NAME 属性但没有 ID 属性的 DOM 元素。我搜索了ceflib单元,没有看到任何可以做到的东西。

边问。如果有人有 TChromium“食谱”风格网站或文档的链接,我可以使用它。

更新:在等待答案时,我想出了以下代码来执行 getElementsbyName()。我想要比扫描整个 DOM 树更快的东西。如果您在代码中发现有问题,请告诉我:

0 投票
1 回答
726 浏览

silverlight - Chromium 和 Silverlight(德尔福)?

有没有人尝试过将 Silverlight 与 Chromium 集成?如果是这样,您是否知道列出使其工作的步骤的文档?我正在使用 Delphi 6 和 TChromium 组件。

0 投票
2 回答
4104 浏览

delphi - 如何在 Chromium Embedded 中禁用查看源选项?

是否可以在 Delphi Chromium Embedded 中禁用查看源选项?
我没有在属性/方法列表中找到任何合适的东西。

0 投票
1 回答
1088 浏览

delphi - Delphi Chromium 嵌入在 DLL 表单上

我有一个使用 DLL 中的 VCL 表单的应用程序。在其中一个表格上,我放置了来自 DelphiChromiumEmbedded 的 TChromium。有一个问题:当我卸载我的 DLL(表单被破坏)时,应用程序冻结而没有任何错误或 AV。我找到了一些答案 - 在 lib_cef.pas 中评论了 //cef_shutdown。在这个路径形式成功销毁,但我有很大的内存泄漏。使用其他任何组件从 DLL 创建表单,销毁和卸载 DLL 是成功的。

如何正常卸载带有 TChromium 组件的表单的 DLL?

0 投票
2 回答
10155 浏览

delphi - 如何清除嵌入式 Chromium 浏览器的缓存和 cookie?

我用 TChromium 创建了一个浏览器。TChromium 是动态创建的。Facebook 访问(登录) 在流程结束时,组件被销毁。再次创建组件时会出现问题 他继续上一个会话(登录)。我需要清理所有缓存和 cookie。(强制注销)

在代码下方,我通过以下方式创建组件:

我销毁它并像这样释放内存:

我应该怎么办?

0 投票
1 回答
3519 浏览

delphi - 如何在不使用匿名方法的情况下迭代 Delphi Chromium Embedded 中的 DOM 节点?

德尔福嵌入式 Chrome

由于我的技能有限,我无法弄清楚如何在 Delphi 7 中做同样的事情,因为它不支持匿名方法!