Skip to content

Commit

Permalink
doc: fix c++ addon hello world sample
Browse files Browse the repository at this point in the history
PR-URL: #56172
Refs: #56173
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
  • Loading branch information
geeksilva97 authored and aduh95 committed Dec 10, 2024
1 parent 28a4b6f commit 114a3e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/api/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,15 @@ namespace demo {
using v8::FunctionCallbackInfo;
using v8::Isolate;
using v8::Local;
using v8::NewStringType;
using v8::Object;
using v8::String;
using v8::Value;

void Method(const FunctionCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
args.GetReturnValue().Set(String::NewFromUtf8(
isolate, "world").ToLocalChecked());
isolate, "world", NewStringType::kNormal).ToLocalChecked());
}

void Initialize(Local<Object> exports) {
Expand Down

0 comments on commit 114a3e5

Please sign in to comment.