Some checks failed
Lint / pre-commit Linting (push) Has been cancelled
Deploy js code to an instance of screeps. Some debugging tools are implemented. Reviewed-on: #6 Co-authored-by: Philipp Horstenkamp <philipp@horstenkamp.de> Co-committed-by: Philipp Horstenkamp <philipp@horstenkamp.de>
1.2 KiB
1.2 KiB
Script
NAN provides a v8::Script
helpers as the API has changed over the supported versions of V8.
Nan::CompileScript()
A wrapper around v8::Script::Compile()
.
Note that Nan::BoundScript
is an alias for v8::Script
.
Signature:
Nan::MaybeLocal<Nan::BoundScript> Nan::CompileScript(
v8::Local<v8::String> s,
const v8::ScriptOrigin& origin);
Nan::MaybeLocal<Nan::BoundScript> Nan::CompileScript(v8::Local<v8::String> s);
Nan::RunScript()
Calls script->Run()
or script->BindToCurrentContext()->Run(Nan::GetCurrentContext())
.
Note that Nan::BoundScript
is an alias for v8::Script
and Nan::UnboundScript
is an alias for v8::UnboundScript
where available and v8::Script
on older versions of V8.
Signature:
Nan::MaybeLocal<v8::Value> Nan::RunScript(v8::Local<Nan::UnboundScript> script)
Nan::MaybeLocal<v8::Value> Nan::RunScript(v8::Local<Nan::BoundScript> script)