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;

posted on 2017-05-13 13:55  Values  阅读(776)  评论(0编辑  收藏  举报