mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 15:41:48 +00:00
fix custom elements when minified js is used
This commit is contained in:
committed by
Muki Kiboigo
parent
f1ff789334
commit
68dfb4ee86
@@ -1262,6 +1262,11 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
|
||||
return valueToString(allocator, name, self.js_context.isolate, self.js_context.v8_context);
|
||||
}
|
||||
|
||||
pub fn setName(self: *const Function, name: []const u8) void {
|
||||
const v8_name = v8.String.initUtf8(self.js_context.isolate, name);
|
||||
self.func.castToFunction().setName(v8_name);
|
||||
}
|
||||
|
||||
pub fn withThis(self: *const Function, value: anytype) !Function {
|
||||
const this_obj = if (@TypeOf(value) == JsObject)
|
||||
value.js_obj
|
||||
|
||||
Reference in New Issue
Block a user