Skip to content

Commit 67a310d

Browse files
authored
Merge pull request #173 from lightpanda-io/functioncallbackinfo_newtarget
Expose v8__FunctionCallbackInfo__NewTarget
2 parents 536b97d + 2785878 commit 67a310d

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/binding.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,6 +1544,11 @@ bool v8__FunctionCallbackInfo__IsConstructCall(
15441544
return self.IsConstructCall();
15451545
}
15461546

1547+
const v8::Value* v8__FunctionCallbackInfo__NewTarget(
1548+
const v8::FunctionCallbackInfo<v8::Value>& self) {
1549+
return local_to_ptr(self.NewTarget());
1550+
}
1551+
15471552
// PropertyCallbackInfo
15481553

15491554
v8::Isolate* v8__PropertyCallbackInfo__GetIsolate(

src/binding.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,8 @@ const Value* v8__FunctionCallbackInfo__Data(
800800
const FunctionCallbackInfo* self);
801801
bool v8__FunctionCallbackInfo__IsConstructCall(
802802
const FunctionCallbackInfo* self);
803+
const Value* v8__FunctionCallbackInfo__NewTarget(
804+
const FunctionCallbackInfo* self);
803805

804806
// PropertyCallbackInfo
805807
Isolate* v8__PropertyCallbackInfo__GetIsolate(

0 commit comments

Comments
 (0)