allow HTMLEvents in createEvent

This commit is contained in:
nikneym
2025-09-16 17:24:50 +03:00
parent a87f4abd5f
commit 13a7219dbd

View File

@@ -116,7 +116,9 @@ pub const Document = struct {
base: *parser.Event, base: *parser.Event,
custom: CustomEvent, custom: CustomEvent,
} { } {
if (std.ascii.eqlIgnoreCase(eventCstr, "Event") or std.ascii.eqlIgnoreCase(eventCstr, "Events")) { const eqlIgnoreCase = std.ascii.eqlIgnoreCase;
if (eqlIgnoreCase(eventCstr, "Event") or eqlIgnoreCase(eventCstr, "Events") or eqlIgnoreCase(eventCstr, "HTMLEvents")) {
return .{ .base = try parser.eventCreate() }; return .{ .base = try parser.eventCreate() };
} }