GetResourceHandler 事件
procedure Chromium1GetResourceHandler(Sender: TObject; const browser: ICefBrowser;
const frame: ICefFrame; const request: ICefRequest; out Result: ICefResourceHandler);
var
AElements:ICefPostDataElement;
AStr:AnsiString;
begin
if Assigned(request.PostData) then
begin
AElements := ICefPostDataElement(request.PostData.GetElements(1)[0]);
if (AElements.GetType = TCefPostDataElementType.PDE_TYPE_BYTES)
or (AElements.GetType = TCefPostDataElementType.PDE_TYPE_FILE) then
begin
SetLength(AStr,AElements.GetBytesCount);
AElements.GetBytes(AElements.GetBytesCount,PChar(AStr));
end;
end;
end;
联系客服