mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 07:31:47 +00:00
netsurf: declare EventTargetTBase as extern
to guarantee the memory layout
This commit is contained in:
@@ -333,7 +333,7 @@ pub const Page = struct {
|
||||
// dispatch window.load event
|
||||
const loadevt = try parser.eventCreate();
|
||||
try parser.eventInit(loadevt, "load", .{});
|
||||
_ = try parser.eventTargetDispatchEvent(parser.toEventTarget(EventTargetTBase, &self.session.window), loadevt);
|
||||
_ = try parser.eventTargetDispatchEvent(parser.toEventTarget(Window, &self.session.window), loadevt);
|
||||
}
|
||||
|
||||
// evalScript evaluates the src in priority.
|
||||
|
||||
@@ -653,7 +653,7 @@ pub fn eventTargetTBaseFieldName(comptime T: type) ?[]const u8 {
|
||||
}
|
||||
|
||||
// EventTargetBase is used to implement EventTarget for pure zig struct.
|
||||
pub const EventTargetTBase = struct {
|
||||
pub const EventTargetTBase = extern struct {
|
||||
const Self = @This();
|
||||
|
||||
vtable: ?*const c.struct_dom_event_target_vtable = &c.struct_dom_event_target_vtable{
|
||||
|
||||
Reference in New Issue
Block a user