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 <[email protected]>
Reviewed-By: theanarkh <[email protected]>
  • Loading branch information
geeksilva97 authored Dec 9, 2024
1 parent 80c0055 commit 0a7eeb5
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 0a7eeb5

Please sign in to comment.