Skip to content

Commit 16a8785

Browse files
authored
Merge pull request #117 from lightpanda-io/function_template_accessor
Expose setAccessorGetter on FunctionTemplate
2 parents f11ada2 + 0d19781 commit 16a8785

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/v8.zig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,10 @@ pub const FunctionTemplate = struct {
837837
pub fn setReadOnlyPrototype(self: Self) void {
838838
c.v8__FunctionTemplate__ReadOnlyPrototype(self.handle);
839839
}
840+
841+
pub fn setAccessorGetter(self: Self, name: Name, getter: FunctionTemplate) void {
842+
c.v8__Template__SetAccessorProperty__DEFAULT(@ptrCast(self.handle), name.handle, getter.handle);
843+
}
840844
};
841845

842846
pub const Function = struct {

0 commit comments

Comments
 (0)