mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
netsurf: use the right type for EventTarget cast
This commit is contained in:
@@ -478,8 +478,8 @@ fn eventTargetVtable(et: *EventTarget) c.dom_event_target_vtable {
|
||||
}
|
||||
|
||||
pub inline fn toEventTarget(comptime T: type, v: *T) *EventTarget {
|
||||
const node_aligned: *align(@alignOf(NodeExternal)) T = @alignCast(v);
|
||||
return @as(*EventTarget, @ptrCast(node_aligned));
|
||||
const et_aligned: *align(@alignOf(EventTarget)) T = @alignCast(v);
|
||||
return @as(*EventTarget, @ptrCast(et_aligned));
|
||||
}
|
||||
|
||||
pub fn eventTargetHasListener(
|
||||
|
||||
Reference in New Issue
Block a user