html: add missing applet, basefont and keygen tags

This commit is contained in:
Pierre Tachoire
2024-01-22 11:08:46 +01:00
parent 45504a50e7
commit 9a050fe069
2 changed files with 14 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ pub const Interfaces = .{
HTMLAnchorElement,
HTMLAreaElement,
HTMLAudioElement,
HTMLAppletElement,
HTMLBRElement,
HTMLBaseElement,
HTMLBodyElement,
@@ -113,6 +114,12 @@ pub const HTMLAnchorElement = struct {
pub const mem_guarantied = true;
};
pub const HTMLAppletElement = struct {
pub const Self = parser.Applet;
pub const prototype = *HTMLElement;
pub const mem_guarantied = true;
};
pub const HTMLAreaElement = struct {
pub const Self = parser.Area;
pub const prototype = *HTMLElement;
@@ -495,8 +502,9 @@ pub fn toInterface(comptime T: type, e: *parser.Element) !T {
const elem: *align(@alignOf(*parser.Element)) parser.Element = @alignCast(e);
const tag = try parser.elementHTMLGetTagType(@as(*parser.ElementHTML, @ptrCast(elem)));
return switch (tag) {
.abbr, .acronym, .address, .article, .aside, .b, .bdi, .bdo, .bgsound, .big, .center, .cite, .code, .dd, .details, .dfn, .dt, .em, .figcaption, .figure, .footer, .header, .hgroup, .i, .isindex, .kbd, .main, .mark, .marquee, .menu, .menuitem, .nav, .nobr, .noframes, .noscript, .rp, .rt, .ruby, .s, .samp, .section, .small, .spacer, .strike, .strong, .sub, .summary, .sup, .tt, .u, .wbr, ._var => .{ .HTMLElement = @as(*parser.ElementHTML, @ptrCast(elem)) },
.abbr, .acronym, .address, .article, .aside, .b, .basefont, .bdi, .bdo, .bgsound, .big, .center, .cite, .code, .dd, .details, .dfn, .dt, .em, .figcaption, .figure, .footer, .header, .hgroup, .i, .isindex, .keygen, .kbd, .main, .mark, .marquee, .menu, .menuitem, .nav, .nobr, .noframes, .noscript, .rp, .rt, .ruby, .s, .samp, .section, .small, .spacer, .strike, .strong, .sub, .summary, .sup, .tt, .u, .wbr, ._var => .{ .HTMLElement = @as(*parser.ElementHTML, @ptrCast(elem)) },
.a => .{ .HTMLAnchorElement = @as(*parser.Anchor, @ptrCast(elem)) },
.applet => .{ .HTMLAppletElement = @as(*parser.Applet, @ptrCast(elem)) },
.area => .{ .HTMLAreaElement = @as(*parser.Area, @ptrCast(elem)) },
.audio => .{ .HTMLAudioElement = @as(*parser.Audio, @ptrCast(elem)) },
.base => .{ .HTMLBaseElement = @as(*parser.Base, @ptrCast(elem)) },