title: Enumerating DOM nodes in TChromium
body: <p>I am trying to enumerate DOM nodes using the following code (under XE2).</p>
  
  <p>I have borrowed most of this from answers given here in SO, but for some reason it's not doing anything.</p>
  
  <p>IOW, ProcessDOM() is not ever getting called.</p>
  
  <p>And, I am at my wits end.</p>
  
  <p>Could someone show me what I am doing wrong here.</p>
  
  <p>Thanks in advance.</p>
  
  <pre><code>procedure ProcessNode(ANode: ICefDomNode);
  var
    Node1: ICefDomNode;
  begin
    if Assigned(ANode) then begin
      Node1 := ANode.FirstChild;
      while Assigned(Node1) do begin
        {Do stuff with node}
        ProcessNode(Node1);
        Node1 := Node1.NextSibling;
      end;
    end;
  end;
  
  procedure ProcessDOM(const ADocument: ICefDomDocument);
  begin
    ProcessNode(ADocument.Body);
  end;
  
  procedure TMainForm.Chrome1LoadEnd(Sender: TObject; const ABrowser: ICefABrowser; const AFrame: ICefAFrame; AStatus: Integer);
  begin
    if Assigned(AFrame) then AFrame.VisitDomProc(ProcessDOM);
  end;
  </code></pre>