xref: /third_party/node/test/addons/symlinked-module/binding.cc
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/addons/symlinked-module/
11cb0ef41Sopenharmony_ci#include <node.h>
21cb0ef41Sopenharmony_ci#include <v8.h>
31cb0ef41Sopenharmony_ci
41cb0ef41Sopenharmony_civoid Method(const v8::FunctionCallbackInfo<v8::Value>& args) {
51cb0ef41Sopenharmony_ci  v8::Isolate* isolate = args.GetIsolate();
61cb0ef41Sopenharmony_ci  args.GetReturnValue().Set(v8::String::NewFromUtf8(
71cb0ef41Sopenharmony_ci        isolate, "world").ToLocalChecked());
81cb0ef41Sopenharmony_ci}
91cb0ef41Sopenharmony_ci
101cb0ef41Sopenharmony_civoid init(v8::Local<v8::Object> exports) {
111cb0ef41Sopenharmony_ci  NODE_SET_METHOD(exports, "hello", Method);
121cb0ef41Sopenharmony_ci}
131cb0ef41Sopenharmony_ci
141cb0ef41Sopenharmony_ciNODE_MODULE(NODE_GYP_MODULE_NAME, init)
15

Indexes created Thu Nov 07 10:32:03 CST 2024