html: add strong tag

This commit is contained in:
Pierre Tachoire
2024-01-19 17:42:43 +01:00
parent c2106b4b77
commit f7752675bc
2 changed files with 2 additions and 1 deletions

View File

@@ -495,7 +495,7 @@ 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, .nav, .nobr, .noframes, .noscript, .rp, .rt, .ruby, .s, .samp, .section, .small, .spacer, .strike, .sub, .summary, .sup, .tt, .u, .wbr, ._var => .{ .HTMLElement = @as(*parser.ElementHTML, @ptrCast(elem)) },
.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, .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)) },
.area => .{ .HTMLAreaElement = @as(*parser.Area, @ptrCast(elem)) },
.audio => .{ .HTMLAudioElement = @as(*parser.Audio, @ptrCast(elem)) },

View File

@@ -187,6 +187,7 @@ pub const Tag = enum(u8) {
source = c.DOM_HTML_ELEMENT_TYPE_SOURCE,
span = c.DOM_HTML_ELEMENT_TYPE_SPAN,
style = c.DOM_HTML_ELEMENT_TYPE_STYLE,
strong = c.DOM_HTML_ELEMENT_TYPE_STRONG,
table = c.DOM_HTML_ELEMENT_TYPE_TABLE,
caption = c.DOM_HTML_ELEMENT_TYPE_CAPTION,
th = c.DOM_HTML_ELEMENT_TYPE_TH,