WSjunior / dcef3

Automatically exported from code.google.com/p/dcef3
0 stars 0 forks source link

return object to javascript variable #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Trying to return object to javascript variable, 
-----------------
TCefRTTIExtension.Register('app', TTestExtension);

  TTestExtension = class
    class function hello: string;
    class function hello2: ICefv8value;
  end;

...
implementation
------------------
class function TTestExtension.hello2: ICefv8value;
var
  ret: ICefv8Value;
begin
  ret := TCefv8ValueRef.NewArray(2);
  ret.SetValueByIndex(0,TCefv8ValueRef.NewString('document.URL'));
  ret.SetValueByIndex(1,TCefv8ValueRef.NewString('document.URL'));
  result := TCefv8ValueRef.NewObject(nil);
  result.SetUserData(ret); 
end;
------------------
but in console function return empty object.

Original issue reported on code.google.com by amphilim...@gmail.com on 21 Aug 2014 at 5:01

GoogleCodeExporter commented 9 years ago
it was not possible to return a ICefV8Value interface (not implemented), it is 
now fixed

Original comment by hgourv...@gmail.com on 1 Mar 2015 at 11:10