mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-24 08:02:15 +02:00
Fixed wrong DevTools method result handling in MiniBrowser demo
This commit is contained in:
parent
cfe43f040f
commit
e19ecae2b5
@ -1137,14 +1137,21 @@ begin
|
||||
TempResult := 0;
|
||||
|
||||
if success then
|
||||
begin
|
||||
TempResult := 1;
|
||||
FDevToolsMsgValue := '';
|
||||
|
||||
if (result <> nil) then
|
||||
begin
|
||||
TempDict := result.GetDictionary;
|
||||
|
||||
if (TempDict <> nil) and (TempDict.GetSize > 0) then
|
||||
begin
|
||||
TempValue := TempDict.GetValue('data');
|
||||
|
||||
if (TempValue <> nil) and (TempValue.GetType = VTYPE_STRING) then
|
||||
begin
|
||||
FDevToolsMsgValue := TempValue.GetString;
|
||||
if (length(FDevToolsMsgValue) > 0) then TempResult := 1;
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else
|
||||
@ -1181,6 +1188,8 @@ var
|
||||
TempLen : integer;
|
||||
begin
|
||||
if (aMessage.WParam <> 0) then
|
||||
begin
|
||||
if (length(FDevToolsMsgValue) > 0) then
|
||||
begin
|
||||
TempData := TNetEncoding.Base64.DecodeStringToBytes(FDevToolsMsgValue);
|
||||
TempLen := length(TempData);
|
||||
@ -1216,6 +1225,9 @@ begin
|
||||
else
|
||||
showmessage('There was an error decoding the data');
|
||||
end
|
||||
else
|
||||
showmessage('DevTools method executed successfully!');
|
||||
end
|
||||
else
|
||||
if (length(FDevToolsMsgValue) > 0) then
|
||||
showmessage(FDevToolsMsgValue)
|
||||
|
@ -2,7 +2,7 @@
|
||||
"UpdateLazPackages" : [
|
||||
{
|
||||
"ForceNotify" : true,
|
||||
"InternalVersion" : 225,
|
||||
"InternalVersion" : 226,
|
||||
"Name" : "cef4delphi_lazarus.lpk",
|
||||
"Version" : "87.1.12.0"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user