Get value from main process (native JS function)
Posted: Mon Aug 31, 2020 6:08 pm
Hello.
I need to create a JS native function than will get return value from main process. I tried to use the example but I didn't understand how can I get value from main process and return it:
Please help. I don't understand how to send message to the main process and wait for an answer.
I need to create a JS native function than will get return value from main process. I tried to use the example but I didn't understand how can I get value from main process and return it:
Code: Select all
function TMyV8Handler.Execute(const name : ustring;
const obj : ICefv8Value;
const arguments : TCefv8ValueArray;
var retval : ICefv8Value;
var exception : ustring): Boolean;
begin
if (name = 'myfunc') then
begin
retval := TCefv8ValueRef.NewString('My Value!'); // <---- What I need to write here?
Result := True;
end
else
Result := False;
end;