1

Delphi Embedded Chrome

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!

Community
  • 1
  • 1
user1262167
  • 81
  • 2
  • 5

1 Answers1

2
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;
GolezTrol
  • 114,394
  • 18
  • 182
  • 210