mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
allow HTMLEvents in createEvent
This commit is contained in:
@@ -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() };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user