how to send string data into a javascript?
问题 I am using v8 and i faced next problem - i have an application which running a javascript file ( i simply read it into a string and than execute with Local<String> source = String::New(javascript); //javascript is string with js file Local<Script> script = Script::Compile(source); Local<Value> result = script->Run(); how can I send a string variable into this file? 回答1: Put a placeholder in the script source, like STRING_HERE . Then, before creating the source object, find that placeholder in