Skip to content

Commit b7d26cf

Browse files
authored
Merge pull request #1053 from lightpanda-io/nikneym/create-event-html-events
allow `HTMLEvents` in `createEvent`
2 parents 59b4033 + 13a7219 commit b7d26cf

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)