如何在不使用匿名方法的情况下迭代Delphi Chromium Embedded中的DOM节点? [英] How to iterate DOM nodes in Delphi Chromium Embedded without use of anonymous method?
本文介绍了如何在不使用匿名方法的情况下迭代Delphi Chromium Embedded中的DOM节点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
到期尽我的能力,我不知道如何在Delphi 7中做同样的事情,因为它不支持匿名方法!
Due to my limited skill, I cannot figure out how to do the same thing in Delphi 7, as it doesn't support an anonymous method!
推荐答案
procedure TheProcThatHandlesItAll(const doc: ICefDomDocument)
var
q: ICefDomNode;
begin
// "q" is the ID of the text input element
q := doc.GetElementById('q');
if Assigned(q) then
q.SetElementAttribute('value', 'Hello, world');
end
procedure TMainForm.actDomExecute(Sender: TObject);
begin
crm.Browser.MainFrame.VisitDomProc(TheProcThatHandlesItAll);
end;
这篇关于如何在不使用匿名方法的情况下迭代Delphi Chromium Embedded中的DOM节点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文