c++ - Is there a way to invoke the new operator from CEF? -


i'd create customevent object within v8 context. tried using .create() browser doesn't let me create way. can call new operator within cef?

this tried invoke with:

(c++ code)

cefrefptr<cefv8value> globalobj = context->getglobal();  cefrefptr<cefv8value> customevent = globalobj->getvalue("customevent"); cefrefptr<cefv8value> prototype = customevent->getvalue("prototype");  cefv8valuelist prototypeargs; prototypeargs.push_back(prototype); prototypeargs.push_back();  cefrefptr<cefv8value> object = globalobj->getvalue("object"); cefrefptr<cefv8value> create = object->getvalue("create"); cefrefptr<cefv8value> event = create->executefunction(null, prototypeargs); 

i want have easy way c++ call

(javascript code)

new customevent("test"); 

use cefv8context::eval execute javascript code need.

cefrefptr<cefv8value> returnvalue; cefrefptr<cefv8exception> exception; context->eval("new customevent('test');", returnvalue, exception); 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -