Skip to content

Commit 13a7219

Browse files
committed
allow HTMLEvents in createEvent
1 parent a87f4ab commit 13a7219

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/browser/dom/document.zig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ pub const Document = struct {
116116
base: *parser.Event,
117117
custom: CustomEvent,
118118
} {
119-
if (std.ascii.eqlIgnoreCase(eventCstr, "Event") or std.ascii.eqlIgnoreCase(eventCstr, "Events")) {
119+
const eqlIgnoreCase = std.ascii.eqlIgnoreCase;
120+
121+
if (eqlIgnoreCase(eventCstr, "Event") or eqlIgnoreCase(eventCstr, "Events") or eqlIgnoreCase(eventCstr, "HTMLEvents")) {
120122
return .{ .base = try parser.eventCreate() };
121123
}
122124

0 commit comments

Comments
 (0)