mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
1442c1c6de
fix #6910
17 lines
392 B
C++
17 lines
392 B
C++
#include <node.h>
|
|
#include <v8.h>
|
|
|
|
using namespace v8;
|
|
|
|
void Method(const FunctionCallbackInfo<Value>& args) {
|
|
Isolate* isolate = Isolate::GetCurrent();
|
|
HandleScope scope(isolate);
|
|
args.GetReturnValue().Set(String::NewFromUtf8(isolate, "world"));
|
|
}
|
|
|
|
void init(Handle<Object> exports, Handle<Object> module) {
|
|
NODE_SET_METHOD(module, "exports", Method);
|
|
}
|
|
|
|
NODE_MODULE(binding, init);
|