add padding field for some other webapi

This commit is contained in:
Pierre Tachoire
2026-02-24 21:36:38 +01:00
parent 8291e4ba73
commit a0e5c9d570
3 changed files with 9 additions and 0 deletions

View File

@@ -29,6 +29,9 @@ const Document = @import("Document.zig");
const DOMParser = @This();
// Padding to avoid zero-size struct, which causes identity_map pointer collisions.
_pad: bool = false,
pub fn init() DOMParser {
return .{};
}

View File

@@ -22,6 +22,9 @@ const Element = @import("Element.zig");
pub const ResizeObserver = @This();
// Padding to avoid zero-size struct, which causes identity_map pointer collisions.
_pad: bool = false,
fn init(cbk: js.Function) ResizeObserver {
_ = cbk;
return .{};

View File

@@ -25,6 +25,9 @@ const dump = @import("../dump.zig");
const XMLSerializer = @This();
// Padding to avoid zero-size struct, which causes identity_map pointer collisions.
_pad: bool = false,
pub fn init() XMLSerializer {
return .{};
}