delphichromiumtchromium

Delphi Chromium CEF4 Response Filter


Hi fellow stackoverflow,

I have tinkering around delhi CEF4, REsponse filter, and try to catch load resource json responses. with the demo included here:

But the problem looks like it can only triggered once.

Is there anyway to make it triggered again and again. or everytime without reload the page?

    procedure TResponseFilterBrowserFrm.Filter_OnFilter(Sender: TObject;
  data_in: Pointer; data_in_size: NativeUInt; var data_in_read: NativeUInt;
  data_out: Pointer; data_out_size: NativeUInt;
  var data_out_written: NativeUInt; var aResult: TCefResponseFilterStatus);

I dont understand how this got triggered.

I tried to modify:

function TResponseFilterBrowserFrm.IsMyResource(const aRequest
  : ICefRequest): Boolean;
var
  TempName: string;
begin

  Result := True;

end;

but it seems it can olny be trigered once.


Solution

  • I just need to add FRscCompleted := False; at the end of this procedure.

    procedure TResponseFilterBrowserFrm.StreamCopyCompleteMsg (var aMessage: TMessage);