Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
doc: fix c++ addon hello world sample
  • Loading branch information
geeksilva97 committed Dec 7, 2024
commit 65305c73c011e8f05d53c88817b6ebb4203c7148
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