diff --git a/src/browser/Page.zig b/src/browser/Page.zig index 9b4fe704..032e5ac6 100644 --- a/src/browser/Page.zig +++ b/src/browser/Page.zig @@ -1364,6 +1364,12 @@ pub fn createElementNS(self: *Page, namespace: Element.Namespace, name: []const attribute_iterator, .{ ._proto = undefined, ._tag_name = String.init(undefined, "i", .{}) catch unreachable, ._tag = .i }, ), + 'q' => return self.createHtmlElementT( + Element.Html.Quote, + namespace, + attribute_iterator, + .{ ._proto = undefined, ._tag_name = String.init(undefined, "q", .{}) catch unreachable, ._tag = .unknown }, + ), 's' => return self.createHtmlElementT( Element.Html.Generic, namespace, @@ -1464,22 +1470,22 @@ pub fn createElementNS(self: *Page, namespace: Element.Namespace, name: []const .{ ._proto = undefined, ._tag_name = String.init(undefined, "dt", .{}) catch unreachable, ._tag = .dt }, ), asUint("td") => return self.createHtmlElementT( - Element.Html.Generic, + Element.Html.TableCell, namespace, attribute_iterator, .{ ._proto = undefined, ._tag_name = String.init(undefined, "td", .{}) catch unreachable, ._tag = .td }, ), asUint("th") => return self.createHtmlElementT( - Element.Html.Generic, + Element.Html.TableCell, namespace, attribute_iterator, .{ ._proto = undefined, ._tag_name = String.init(undefined, "th", .{}) catch unreachable, ._tag = .th }, ), asUint("tr") => return self.createHtmlElementT( - Element.Html.Generic, + Element.Html.TableRow, namespace, attribute_iterator, - .{ ._proto = undefined, ._tag_name = String.init(undefined, "tr", .{}) catch unreachable, ._tag = .tr }, + .{ ._proto = undefined }, ), else => {}, }, @@ -1503,17 +1509,41 @@ pub fn createElementNS(self: *Page, namespace: Element.Namespace, name: []const .{ ._proto = undefined, ._tag_name = String.init(undefined, "nav", .{}) catch unreachable, ._tag = .nav }, ), asUint("del") => return self.createHtmlElementT( - Element.Html.Generic, + Element.Html.Mod, namespace, attribute_iterator, .{ ._proto = undefined, ._tag_name = String.init(undefined, "del", .{}) catch unreachable, ._tag = .del }, ), asUint("ins") => return self.createHtmlElementT( - Element.Html.Generic, + Element.Html.Mod, namespace, attribute_iterator, .{ ._proto = undefined, ._tag_name = String.init(undefined, "ins", .{}) catch unreachable, ._tag = .ins }, ), + asUint("col") => return self.createHtmlElementT( + Element.Html.TableCol, + namespace, + attribute_iterator, + .{ ._proto = undefined, ._tag_name = String.init(undefined, "col", .{}) catch unreachable, ._tag = .unknown }, + ), + asUint("dir") => return self.createHtmlElementT( + Element.Html.Directory, + namespace, + attribute_iterator, + .{ ._proto = undefined }, + ), + asUint("map") => return self.createHtmlElementT( + Element.Html.Map, + namespace, + attribute_iterator, + .{ ._proto = undefined }, + ), + asUint("pre") => return self.createHtmlElementT( + Element.Html.Pre, + namespace, + attribute_iterator, + .{ ._proto = undefined }, + ), asUint("sub") => return self.createHtmlElementT( Element.Html.Generic, namespace, @@ -1536,10 +1566,10 @@ pub fn createElementNS(self: *Page, namespace: Element.Namespace, name: []const }, 4 => switch (@as(u32, @bitCast(name[0..4].*))) { asUint("span") => return self.createHtmlElementT( - Element.Html.Generic, + Element.Html.Span, namespace, attribute_iterator, - .{ ._proto = undefined, ._tag_name = String.init(undefined, "span", .{}) catch unreachable, ._tag = .span }, + .{ ._proto = undefined }, ), asUint("meta") => return self.createHtmlElementT( Element.Html.Meta, @@ -1597,10 +1627,10 @@ pub fn createElementNS(self: *Page, namespace: Element.Namespace, name: []const ), asUint("base") => { const n = try self.createHtmlElementT( - Element.Html.Generic, + Element.Html.Base, namespace, attribute_iterator, - .{ ._proto = undefined, ._tag_name = String.init(undefined, "base", .{}) catch unreachable, ._tag = .base }, + .{ ._proto = undefined }, ); // If page's base url is not already set, fill it with the base @@ -1620,10 +1650,16 @@ pub fn createElementNS(self: *Page, namespace: Element.Namespace, name: []const .{ ._proto = undefined, ._tag_name = String.init(undefined, "menu", .{}) catch unreachable, ._tag = .menu }, ), asUint("area") => return self.createHtmlElementT( - Element.Html.Generic, + Element.Html.Area, namespace, attribute_iterator, - .{ ._proto = undefined, ._tag_name = String.init(undefined, "area", .{}) catch unreachable, ._tag = .area }, + .{ ._proto = undefined }, + ), + asUint("font") => return self.createHtmlElementT( + Element.Html.Font, + namespace, + attribute_iterator, + .{ ._proto = undefined }, ), asUint("code") => return self.createHtmlElementT( Element.Html.Generic, @@ -1632,10 +1668,10 @@ pub fn createElementNS(self: *Page, namespace: Element.Namespace, name: []const .{ ._proto = undefined, ._tag_name = String.init(undefined, "code", .{}) catch unreachable, ._tag = .code }, ), asUint("time") => return self.createHtmlElementT( - Element.Html.Generic, + Element.Html.Time, namespace, attribute_iterator, - .{ ._proto = undefined, ._tag_name = String.init(undefined, "time", .{}) catch unreachable, ._tag = .time }, + .{ ._proto = undefined }, ), else => {}, }, @@ -1680,36 +1716,54 @@ pub fn createElementNS(self: *Page, namespace: Element.Namespace, name: []const attribute_iterator, .{ ._proto = undefined, ._tag_name = String.init(undefined, "aside", .{}) catch unreachable, ._tag = .aside }, ), - asUint("meter") => return self.createHtmlElementT( - Element.Html.Generic, + asUint("label") => return self.createHtmlElementT( + Element.Html.Label, namespace, attribute_iterator, - .{ ._proto = undefined, ._tag_name = String.init(undefined, "meter", .{}) catch unreachable, ._tag = .meter }, + .{ ._proto = undefined }, + ), + asUint("meter") => return self.createHtmlElementT( + Element.Html.Meter, + namespace, + attribute_iterator, + .{ ._proto = undefined }, + ), + asUint("param") => return self.createHtmlElementT( + Element.Html.Param, + namespace, + attribute_iterator, + .{ ._proto = undefined }, ), asUint("table") => return self.createHtmlElementT( - Element.Html.Generic, + Element.Html.Table, namespace, attribute_iterator, - .{ ._proto = undefined, ._tag_name = String.init(undefined, "table", .{}) catch unreachable, ._tag = .table }, + .{ ._proto = undefined }, ), asUint("thead") => return self.createHtmlElementT( - Element.Html.Generic, + Element.Html.TableSection, namespace, attribute_iterator, .{ ._proto = undefined, ._tag_name = String.init(undefined, "thead", .{}) catch unreachable, ._tag = .thead }, ), asUint("tbody") => return self.createHtmlElementT( - Element.Html.Generic, + Element.Html.TableSection, namespace, attribute_iterator, .{ ._proto = undefined, ._tag_name = String.init(undefined, "tbody", .{}) catch unreachable, ._tag = .tbody }, ), asUint("tfoot") => return self.createHtmlElementT( - Element.Html.Generic, + Element.Html.TableSection, namespace, attribute_iterator, .{ ._proto = undefined, ._tag_name = String.init(undefined, "tfoot", .{}) catch unreachable, ._tag = .tfoot }, ), + asUint("track") => return self.createHtmlElementT( + Element.Html.Track, + namespace, + attribute_iterator, + .{ ._proto = undefined }, + ), else => {}, }, 6 => switch (@as(u48, @bitCast(name[0..6].*))) { @@ -1737,6 +1791,30 @@ pub fn createElementNS(self: *Page, namespace: Element.Namespace, name: []const attribute_iterator, .{ ._proto = undefined }, ), + asUint("legend") => return self.createHtmlElementT( + Element.Html.Legend, + namespace, + attribute_iterator, + .{ ._proto = undefined }, + ), + asUint("object") => return self.createHtmlElementT( + Element.Html.Object, + namespace, + attribute_iterator, + .{ ._proto = undefined }, + ), + asUint("output") => return self.createHtmlElementT( + Element.Html.Output, + namespace, + attribute_iterator, + .{ ._proto = undefined }, + ), + asUint("source") => return self.createHtmlElementT( + Element.Html.Source, + namespace, + attribute_iterator, + .{ ._proto = undefined }, + ), asUint("strong") => return self.createHtmlElementT( Element.Html.Generic, namespace, @@ -1813,10 +1891,10 @@ pub fn createElementNS(self: *Page, namespace: Element.Namespace, name: []const .{ ._proto = undefined, ._tag_name = String.init(undefined, "summary", .{}) catch unreachable, ._tag = .summary }, ), asUint("caption") => return self.createHtmlElementT( - Element.Html.Generic, + Element.Html.TableCaption, namespace, attribute_iterator, - .{ ._proto = undefined, ._tag_name = String.init(undefined, "caption", .{}) catch unreachable, ._tag = .caption }, + .{ ._proto = undefined }, ), asUint("marquee") => return self.createHtmlElementT( Element.Html.Generic, @@ -1845,35 +1923,41 @@ pub fn createElementNS(self: *Page, namespace: Element.Namespace, name: []const attribute_iterator, .{ ._proto = undefined, ._content = undefined }, ), - asUint("fieldset") => return self.createHtmlElementT( - Element.Html.Generic, + asUint("colgroup") => return self.createHtmlElementT( + Element.Html.TableCol, namespace, attribute_iterator, - .{ ._proto = undefined, ._tag_name = String.init(undefined, "fieldset", .{}) catch unreachable, ._tag = .fieldset }, + .{ ._proto = undefined, ._tag_name = String.init(undefined, "colgroup", .{}) catch unreachable, ._tag = .unknown }, + ), + asUint("fieldset") => return self.createHtmlElementT( + Element.Html.FieldSet, + namespace, + attribute_iterator, + .{ ._proto = undefined }, ), asUint("optgroup") => return self.createHtmlElementT( - Element.Html.Generic, + Element.Html.OptGroup, namespace, attribute_iterator, - .{ ._proto = undefined, ._tag_name = String.init(undefined, "optgroup", .{}) catch unreachable, ._tag = .optgroup }, + .{ ._proto = undefined }, ), asUint("progress") => return self.createHtmlElementT( - Element.Html.Generic, + Element.Html.Progress, namespace, attribute_iterator, - .{ ._proto = undefined, ._tag_name = String.init(undefined, "progress", .{}) catch unreachable, ._tag = .progress }, + .{ ._proto = undefined }, ), asUint("datalist") => return self.createHtmlElementT( - Element.Html.Generic, + Element.Html.DataList, namespace, attribute_iterator, - .{ ._proto = undefined, ._tag_name = String.init(undefined, "datalist", .{}) catch unreachable, ._tag = .datalist }, + .{ ._proto = undefined }, ), else => {}, }, 10 => switch (@as(u80, @bitCast(name[0..10].*))) { asUint("blockquote") => return self.createHtmlElementT( - Element.Html.Generic, + Element.Html.Quote, namespace, attribute_iterator, .{ ._proto = undefined, ._tag_name = String.init(undefined, "blockquote", .{}) catch unreachable, ._tag = .blockquote }, diff --git a/src/browser/js/bridge.zig b/src/browser/js/bridge.zig index 76177ece..01a87317 100644 --- a/src/browser/js/bridge.zig +++ b/src/browser/js/bridge.zig @@ -529,16 +529,22 @@ pub const JsApis = flattenTypes(&.{ @import("../webapi/element/Html.zig"), @import("../webapi/element/html/IFrame.zig"), @import("../webapi/element/html/Anchor.zig"), + @import("../webapi/element/html/Area.zig"), @import("../webapi/element/html/Audio.zig"), + @import("../webapi/element/html/Base.zig"), @import("../webapi/element/html/Body.zig"), @import("../webapi/element/html/BR.zig"), @import("../webapi/element/html/Button.zig"), @import("../webapi/element/html/Canvas.zig"), @import("../webapi/element/html/Custom.zig"), @import("../webapi/element/html/Data.zig"), + @import("../webapi/element/html/DataList.zig"), @import("../webapi/element/html/Dialog.zig"), + @import("../webapi/element/html/Directory.zig"), @import("../webapi/element/html/Div.zig"), @import("../webapi/element/html/Embed.zig"), + @import("../webapi/element/html/FieldSet.zig"), + @import("../webapi/element/html/Font.zig"), @import("../webapi/element/html/Form.zig"), @import("../webapi/element/html/Generic.zig"), @import("../webapi/element/html/Head.zig"), @@ -547,21 +553,42 @@ pub const JsApis = flattenTypes(&.{ @import("../webapi/element/html/Html.zig"), @import("../webapi/element/html/Image.zig"), @import("../webapi/element/html/Input.zig"), + @import("../webapi/element/html/Label.zig"), + @import("../webapi/element/html/Legend.zig"), @import("../webapi/element/html/LI.zig"), @import("../webapi/element/html/Link.zig"), + @import("../webapi/element/html/Map.zig"), @import("../webapi/element/html/Media.zig"), @import("../webapi/element/html/Meta.zig"), + @import("../webapi/element/html/Meter.zig"), + @import("../webapi/element/html/Mod.zig"), + @import("../webapi/element/html/Object.zig"), @import("../webapi/element/html/OL.zig"), + @import("../webapi/element/html/OptGroup.zig"), @import("../webapi/element/html/Option.zig"), + @import("../webapi/element/html/Output.zig"), @import("../webapi/element/html/Paragraph.zig"), + @import("../webapi/element/html/Param.zig"), + @import("../webapi/element/html/Pre.zig"), + @import("../webapi/element/html/Progress.zig"), + @import("../webapi/element/html/Quote.zig"), @import("../webapi/element/html/Script.zig"), @import("../webapi/element/html/Select.zig"), @import("../webapi/element/html/Slot.zig"), + @import("../webapi/element/html/Source.zig"), @import("../webapi/element/html/Span.zig"), @import("../webapi/element/html/Style.zig"), + @import("../webapi/element/html/Table.zig"), + @import("../webapi/element/html/TableCaption.zig"), + @import("../webapi/element/html/TableCell.zig"), + @import("../webapi/element/html/TableCol.zig"), + @import("../webapi/element/html/TableRow.zig"), + @import("../webapi/element/html/TableSection.zig"), @import("../webapi/element/html/Template.zig"), @import("../webapi/element/html/TextArea.zig"), + @import("../webapi/element/html/Time.zig"), @import("../webapi/element/html/Title.zig"), + @import("../webapi/element/html/Track.zig"), @import("../webapi/element/html/Video.zig"), @import("../webapi/element/html/UL.zig"), @import("../webapi/element/html/Unknown.zig"), diff --git a/src/browser/webapi/Element.zig b/src/browser/webapi/Element.zig index d7464661..d918e688 100644 --- a/src/browser/webapi/Element.zig +++ b/src/browser/webapi/Element.zig @@ -191,15 +191,21 @@ pub fn getTagNameLower(self: *const Element) []const u8 { }, else => return switch (he._type) { .anchor => "a", + .area => "area", + .base => "base", .body => "body", .br => "br", .button => "button", .canvas => "canvas", .custom => |e| e._tag_name.str(), .data => "data", + .datalist => "datalist", .dialog => "dialog", + .directory => "dir", .div => "div", .embed => "embed", + .fieldset => "fieldset", + .font => "font", .form => "form", .generic => |e| e._tag_name.str(), .heading => |e| e._tag_name.str(), @@ -209,25 +215,46 @@ pub fn getTagNameLower(self: *const Element) []const u8 { .iframe => "iframe", .img => "img", .input => "input", + .label => "label", + .legend => "legend", .li => "li", .link => "link", + .map => "map", .media => |m| switch (m._type) { .audio => "audio", .video => "video", .generic => "media", }, .meta => "meta", + .meter => "meter", + .mod => |e| e._tag_name.str(), + .object => "object", .ol => "ol", + .optgroup => "optgroup", .option => "option", + .output => "output", .p => "p", + .param => "param", + .pre => "pre", + .progress => "progress", + .quote => |e| e._tag_name.str(), .script => "script", .select => "select", .slot => "slot", + .source => "source", .span => "span", .style => "style", + .table => "table", + .table_caption => "caption", + .table_cell => |e| e._tag_name.str(), + .table_col => |e| e._tag_name.str(), + .table_row => "tr", + .table_section => |e| e._tag_name.str(), .template => "template", .textarea => "textarea", + .time => "time", .title => "title", + .track => "track", .ul => "ul", .unknown => |e| e._tag_name.str(), }, @@ -240,15 +267,21 @@ pub fn getTagNameSpec(self: *const Element, buf: []u8) []const u8 { return switch (self._type) { .html => |he| switch (he._type) { .anchor => "A", + .area => "AREA", + .base => "BASE", .body => "BODY", .br => "BR", .button => "BUTTON", .canvas => "CANVAS", .custom => |e| upperTagName(&e._tag_name, buf), .data => "DATA", + .datalist => "DATALIST", .dialog => "DIALOG", + .directory => "DIR", .div => "DIV", .embed => "EMBED", + .fieldset => "FIELDSET", + .font => "FONT", .form => "FORM", .generic => |e| upperTagName(&e._tag_name, buf), .heading => |e| upperTagName(&e._tag_name, buf), @@ -258,25 +291,46 @@ pub fn getTagNameSpec(self: *const Element, buf: []u8) []const u8 { .iframe => "IFRAME", .img => "IMG", .input => "INPUT", + .label => "LABEL", + .legend => "LEGEND", .li => "LI", .link => "LINK", + .map => "MAP", .meta => "META", .media => |m| switch (m._type) { .audio => "AUDIO", .video => "VIDEO", .generic => "MEDIA", }, + .meter => "METER", + .mod => |e| upperTagName(&e._tag_name, buf), + .object => "OBJECT", .ol => "OL", + .optgroup => "OPTGROUP", .option => "OPTION", + .output => "OUTPUT", .p => "P", + .param => "PARAM", + .pre => "PRE", + .progress => "PROGRESS", + .quote => |e| upperTagName(&e._tag_name, buf), .script => "SCRIPT", .select => "SELECT", .slot => "SLOT", + .source => "SOURCE", .span => "SPAN", .style => "STYLE", + .table => "TABLE", + .table_caption => "CAPTION", + .table_cell => |e| upperTagName(&e._tag_name, buf), + .table_col => |e| upperTagName(&e._tag_name, buf), + .table_row => "TR", + .table_section => |e| upperTagName(&e._tag_name, buf), .template => "TEMPLATE", .textarea => "TEXTAREA", + .time => "TIME", .title => "TITLE", + .track => "TRACK", .ul => "UL", .unknown => |e| switch (self._namespace) { .html => upperTagName(&e._tag_name, buf), @@ -1074,35 +1128,62 @@ pub fn getTag(self: *const Element) Tag { return switch (self._type) { .html => |he| switch (he._type) { .anchor => .anchor, + .area => .area, + .base => .base, .div => .div, .embed => .embed, .form => .form, .p => .p, .custom => .custom, .data => .data, + .datalist => .datalist, .dialog => .dialog, + .directory => .unknown, .iframe => .iframe, .img => .img, .br => .br, .button => .button, .canvas => .canvas, + .fieldset => .fieldset, + .font => .unknown, .heading => |h| h._tag, + .label => .unknown, + .legend => .unknown, .li => .li, + .map => .unknown, .ul => .ul, .ol => .ol, + .object => .unknown, + .optgroup => .optgroup, + .output => .unknown, + .param => .unknown, + .pre => .unknown, .generic => |g| g._tag, .media => |m| switch (m._type) { .audio => .audio, .video => .video, .generic => .media, }, + .meter => .meter, + .mod => |m| m._tag, + .progress => .progress, + .quote => |q| q._tag, .script => .script, .select => .select, .slot => .slot, + .source => .unknown, .span => .span, .option => .option, + .table => .table, + .table_caption => .caption, + .table_cell => |tc| tc._tag, + .table_col => |tc| tc._tag, + .table_row => .tr, + .table_section => |ts| ts._tag, .template => .template, .textarea => .textarea, + .time => .time, + .track => .unknown, .input => .input, .link => .link, .meta => .meta, diff --git a/src/browser/webapi/css/CSSStyleDeclaration.zig b/src/browser/webapi/css/CSSStyleDeclaration.zig index ba695bec..d50aed32 100644 --- a/src/browser/webapi/css/CSSStyleDeclaration.zig +++ b/src/browser/webapi/css/CSSStyleDeclaration.zig @@ -217,8 +217,8 @@ fn getDefaultDisplay(element: *const Element) []const u8 { switch (element._type) { .html => |html| { return switch (html._type) { - .anchor, .br, .span => "inline", - .body, .div, .p, .heading, .form, .button, .canvas, .dialog, .embed, .head, .html, .hr, .iframe, .img, .input, .li, .link, .meta, .ol, .option, .script, .select, .slot, .style, .template, .textarea, .title, .ul, .media => "block", + .anchor, .br, .span, .label, .time, .font, .mod, .quote => "inline", + .body, .div, .p, .heading, .form, .button, .canvas, .dialog, .embed, .head, .html, .hr, .iframe, .img, .input, .li, .link, .meta, .ol, .option, .script, .select, .slot, .style, .template, .textarea, .title, .ul, .media, .area, .base, .datalist, .directory, .fieldset, .legend, .map, .meter, .object, .optgroup, .output, .param, .pre, .progress, .source, .table, .table_caption, .table_cell, .table_col, .table_row, .table_section, .track => "block", .generic, .custom, .unknown, .data => blk: { const tag = element.getTagNameLower(); if (isInlineTag(tag)) break :blk "inline"; diff --git a/src/browser/webapi/element/Html.zig b/src/browser/webapi/element/Html.zig index fca0343b..0a671c36 100644 --- a/src/browser/webapi/element/Html.zig +++ b/src/browser/webapi/element/Html.zig @@ -25,15 +25,21 @@ const Node = @import("../Node.zig"); const Element = @import("../Element.zig"); pub const Anchor = @import("html/Anchor.zig"); +pub const Area = @import("html/Area.zig"); +pub const Base = @import("html/Base.zig"); pub const Body = @import("html/Body.zig"); pub const BR = @import("html/BR.zig"); pub const Button = @import("html/Button.zig"); pub const Canvas = @import("html/Canvas.zig"); pub const Custom = @import("html/Custom.zig"); pub const Data = @import("html/Data.zig"); +pub const DataList = @import("html/DataList.zig"); pub const Dialog = @import("html/Dialog.zig"); +pub const Directory = @import("html/Directory.zig"); pub const Div = @import("html/Div.zig"); pub const Embed = @import("html/Embed.zig"); +pub const FieldSet = @import("html/FieldSet.zig"); +pub const Font = @import("html/Font.zig"); pub const Form = @import("html/Form.zig"); pub const Generic = @import("html/Generic.zig"); pub const Head = @import("html/Head.zig"); @@ -43,21 +49,42 @@ pub const Html = @import("html/Html.zig"); pub const IFrame = @import("html/IFrame.zig"); pub const Image = @import("html/Image.zig"); pub const Input = @import("html/Input.zig"); +pub const Label = @import("html/Label.zig"); +pub const Legend = @import("html/Legend.zig"); pub const LI = @import("html/LI.zig"); pub const Link = @import("html/Link.zig"); +pub const Map = @import("html/Map.zig"); pub const Media = @import("html/Media.zig"); pub const Meta = @import("html/Meta.zig"); +pub const Meter = @import("html/Meter.zig"); +pub const Mod = @import("html/Mod.zig"); +pub const Object = @import("html/Object.zig"); pub const OL = @import("html/OL.zig"); +pub const OptGroup = @import("html/OptGroup.zig"); pub const Option = @import("html/Option.zig"); +pub const Output = @import("html/Output.zig"); pub const Paragraph = @import("html/Paragraph.zig"); +pub const Param = @import("html/Param.zig"); +pub const Pre = @import("html/Pre.zig"); +pub const Progress = @import("html/Progress.zig"); +pub const Quote = @import("html/Quote.zig"); pub const Script = @import("html/Script.zig"); pub const Select = @import("html/Select.zig"); pub const Slot = @import("html/Slot.zig"); +pub const Source = @import("html/Source.zig"); pub const Span = @import("html/Span.zig"); pub const Style = @import("html/Style.zig"); +pub const Table = @import("html/Table.zig"); +pub const TableCaption = @import("html/TableCaption.zig"); +pub const TableCell = @import("html/TableCell.zig"); +pub const TableCol = @import("html/TableCol.zig"); +pub const TableRow = @import("html/TableRow.zig"); +pub const TableSection = @import("html/TableSection.zig"); pub const Template = @import("html/Template.zig"); pub const TextArea = @import("html/TextArea.zig"); +pub const Time = @import("html/Time.zig"); pub const Title = @import("html/Title.zig"); +pub const Track = @import("html/Track.zig"); pub const UL = @import("html/UL.zig"); pub const Unknown = @import("html/Unknown.zig"); @@ -74,15 +101,21 @@ pub fn construct(page: *Page) !*Element { pub const Type = union(enum) { anchor: *Anchor, + area: *Area, + base: *Base, body: *Body, br: *BR, button: *Button, canvas: *Canvas, custom: *Custom, data: *Data, + datalist: *DataList, dialog: *Dialog, + directory: *Directory, div: *Div, embed: *Embed, + fieldset: *FieldSet, + font: *Font, form: *Form, generic: *Generic, heading: *Heading, @@ -92,21 +125,42 @@ pub const Type = union(enum) { img: *Image, iframe: *IFrame, input: *Input, + label: *Label, + legend: *Legend, li: *LI, link: *Link, + map: *Map, media: *Media, meta: *Meta, + meter: *Meter, + mod: *Mod, + object: *Object, ol: *OL, + optgroup: *OptGroup, option: *Option, + output: *Output, p: *Paragraph, + param: *Param, + pre: *Pre, + progress: *Progress, + quote: *Quote, script: *Script, select: *Select, slot: *Slot, + source: *Source, span: *Span, style: *Style, + table: *Table, + table_caption: *TableCaption, + table_cell: *TableCell, + table_col: *TableCol, + table_row: *TableRow, + table_section: *TableSection, template: *Template, textarea: *TextArea, + time: *Time, title: *Title, + track: *Track, ul: *UL, unknown: *Unknown, }; diff --git a/src/browser/webapi/element/html/Area.zig b/src/browser/webapi/element/html/Area.zig new file mode 100644 index 00000000..a74e705c --- /dev/null +++ b/src/browser/webapi/element/html/Area.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Area = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *Area) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Area) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Area); + + pub const Meta = struct { + pub const name = "HTMLAreaElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Base.zig b/src/browser/webapi/element/html/Base.zig new file mode 100644 index 00000000..0c2f2e8a --- /dev/null +++ b/src/browser/webapi/element/html/Base.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Base = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *Base) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Base) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Base); + + pub const Meta = struct { + pub const name = "HTMLBaseElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/DataList.zig b/src/browser/webapi/element/html/DataList.zig new file mode 100644 index 00000000..3bbc3ba6 --- /dev/null +++ b/src/browser/webapi/element/html/DataList.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const DataList = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *DataList) *Element { + return self._proto._proto; +} +pub fn asNode(self: *DataList) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(DataList); + + pub const Meta = struct { + pub const name = "HTMLDataListElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Directory.zig b/src/browser/webapi/element/html/Directory.zig new file mode 100644 index 00000000..cd9f44d0 --- /dev/null +++ b/src/browser/webapi/element/html/Directory.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Directory = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *Directory) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Directory) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Directory); + + pub const Meta = struct { + pub const name = "HTMLDirectoryElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/FieldSet.zig b/src/browser/webapi/element/html/FieldSet.zig new file mode 100644 index 00000000..2b966e2f --- /dev/null +++ b/src/browser/webapi/element/html/FieldSet.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const FieldSet = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *FieldSet) *Element { + return self._proto._proto; +} +pub fn asNode(self: *FieldSet) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(FieldSet); + + pub const Meta = struct { + pub const name = "HTMLFieldSetElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Font.zig b/src/browser/webapi/element/html/Font.zig new file mode 100644 index 00000000..3c6dde77 --- /dev/null +++ b/src/browser/webapi/element/html/Font.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Font = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *Font) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Font) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Font); + + pub const Meta = struct { + pub const name = "HTMLFontElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Label.zig b/src/browser/webapi/element/html/Label.zig new file mode 100644 index 00000000..a9c0243f --- /dev/null +++ b/src/browser/webapi/element/html/Label.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Label = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *Label) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Label) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Label); + + pub const Meta = struct { + pub const name = "HTMLLabelElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Legend.zig b/src/browser/webapi/element/html/Legend.zig new file mode 100644 index 00000000..71f379ab --- /dev/null +++ b/src/browser/webapi/element/html/Legend.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Legend = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *Legend) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Legend) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Legend); + + pub const Meta = struct { + pub const name = "HTMLLegendElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Map.zig b/src/browser/webapi/element/html/Map.zig new file mode 100644 index 00000000..5814558e --- /dev/null +++ b/src/browser/webapi/element/html/Map.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Map = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *Map) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Map) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Map); + + pub const Meta = struct { + pub const name = "HTMLMapElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Meter.zig b/src/browser/webapi/element/html/Meter.zig new file mode 100644 index 00000000..920864ad --- /dev/null +++ b/src/browser/webapi/element/html/Meter.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Meter = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *Meter) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Meter) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Meter); + + pub const Meta = struct { + pub const name = "HTMLMeterElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Mod.zig b/src/browser/webapi/element/html/Mod.zig new file mode 100644 index 00000000..0722ea17 --- /dev/null +++ b/src/browser/webapi/element/html/Mod.zig @@ -0,0 +1,28 @@ +const String = @import("../../../../string.zig").String; +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Mod = @This(); + +_tag_name: String, +_tag: Element.Tag, +_proto: *HtmlElement, + +pub fn asElement(self: *Mod) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Mod) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Mod); + + pub const Meta = struct { + pub const name = "HTMLModElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Object.zig b/src/browser/webapi/element/html/Object.zig new file mode 100644 index 00000000..624f9e8a --- /dev/null +++ b/src/browser/webapi/element/html/Object.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Object = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *Object) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Object) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Object); + + pub const Meta = struct { + pub const name = "HTMLObjectElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/OptGroup.zig b/src/browser/webapi/element/html/OptGroup.zig new file mode 100644 index 00000000..2ccab870 --- /dev/null +++ b/src/browser/webapi/element/html/OptGroup.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const OptGroup = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *OptGroup) *Element { + return self._proto._proto; +} +pub fn asNode(self: *OptGroup) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(OptGroup); + + pub const Meta = struct { + pub const name = "HTMLOptGroupElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Output.zig b/src/browser/webapi/element/html/Output.zig new file mode 100644 index 00000000..8cb8cb38 --- /dev/null +++ b/src/browser/webapi/element/html/Output.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Output = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *Output) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Output) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Output); + + pub const Meta = struct { + pub const name = "HTMLOutputElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Param.zig b/src/browser/webapi/element/html/Param.zig new file mode 100644 index 00000000..41d909f5 --- /dev/null +++ b/src/browser/webapi/element/html/Param.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Param = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *Param) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Param) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Param); + + pub const Meta = struct { + pub const name = "HTMLParamElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Pre.zig b/src/browser/webapi/element/html/Pre.zig new file mode 100644 index 00000000..eb10ce53 --- /dev/null +++ b/src/browser/webapi/element/html/Pre.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Pre = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *Pre) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Pre) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Pre); + + pub const Meta = struct { + pub const name = "HTMLPreElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Progress.zig b/src/browser/webapi/element/html/Progress.zig new file mode 100644 index 00000000..4faa6a44 --- /dev/null +++ b/src/browser/webapi/element/html/Progress.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Progress = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *Progress) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Progress) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Progress); + + pub const Meta = struct { + pub const name = "HTMLProgressElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Quote.zig b/src/browser/webapi/element/html/Quote.zig new file mode 100644 index 00000000..9d1ef3af --- /dev/null +++ b/src/browser/webapi/element/html/Quote.zig @@ -0,0 +1,28 @@ +const String = @import("../../../../string.zig").String; +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Quote = @This(); + +_tag_name: String, +_tag: Element.Tag, +_proto: *HtmlElement, + +pub fn asElement(self: *Quote) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Quote) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Quote); + + pub const Meta = struct { + pub const name = "HTMLQuoteElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Source.zig b/src/browser/webapi/element/html/Source.zig new file mode 100644 index 00000000..8bb43fb0 --- /dev/null +++ b/src/browser/webapi/element/html/Source.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Source = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *Source) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Source) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Source); + + pub const Meta = struct { + pub const name = "HTMLSourceElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Table.zig b/src/browser/webapi/element/html/Table.zig new file mode 100644 index 00000000..27664fe3 --- /dev/null +++ b/src/browser/webapi/element/html/Table.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Table = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *Table) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Table) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Table); + + pub const Meta = struct { + pub const name = "HTMLTableElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/TableCaption.zig b/src/browser/webapi/element/html/TableCaption.zig new file mode 100644 index 00000000..22aece93 --- /dev/null +++ b/src/browser/webapi/element/html/TableCaption.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const TableCaption = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *TableCaption) *Element { + return self._proto._proto; +} +pub fn asNode(self: *TableCaption) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(TableCaption); + + pub const Meta = struct { + pub const name = "HTMLTableCaptionElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/TableCell.zig b/src/browser/webapi/element/html/TableCell.zig new file mode 100644 index 00000000..95ebedb0 --- /dev/null +++ b/src/browser/webapi/element/html/TableCell.zig @@ -0,0 +1,28 @@ +const String = @import("../../../../string.zig").String; +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const TableCell = @This(); + +_tag_name: String, +_tag: Element.Tag, +_proto: *HtmlElement, + +pub fn asElement(self: *TableCell) *Element { + return self._proto._proto; +} +pub fn asNode(self: *TableCell) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(TableCell); + + pub const Meta = struct { + pub const name = "HTMLTableCellElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/TableCol.zig b/src/browser/webapi/element/html/TableCol.zig new file mode 100644 index 00000000..217debe0 --- /dev/null +++ b/src/browser/webapi/element/html/TableCol.zig @@ -0,0 +1,28 @@ +const String = @import("../../../../string.zig").String; +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const TableCol = @This(); + +_tag_name: String, +_tag: Element.Tag, +_proto: *HtmlElement, + +pub fn asElement(self: *TableCol) *Element { + return self._proto._proto; +} +pub fn asNode(self: *TableCol) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(TableCol); + + pub const Meta = struct { + pub const name = "HTMLTableColElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/TableRow.zig b/src/browser/webapi/element/html/TableRow.zig new file mode 100644 index 00000000..33ede0d5 --- /dev/null +++ b/src/browser/webapi/element/html/TableRow.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const TableRow = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *TableRow) *Element { + return self._proto._proto; +} +pub fn asNode(self: *TableRow) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(TableRow); + + pub const Meta = struct { + pub const name = "HTMLTableRowElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/TableSection.zig b/src/browser/webapi/element/html/TableSection.zig new file mode 100644 index 00000000..b0af92eb --- /dev/null +++ b/src/browser/webapi/element/html/TableSection.zig @@ -0,0 +1,28 @@ +const String = @import("../../../../string.zig").String; +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const TableSection = @This(); + +_tag_name: String, +_tag: Element.Tag, +_proto: *HtmlElement, + +pub fn asElement(self: *TableSection) *Element { + return self._proto._proto; +} +pub fn asNode(self: *TableSection) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(TableSection); + + pub const Meta = struct { + pub const name = "HTMLTableSectionElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Time.zig b/src/browser/webapi/element/html/Time.zig new file mode 100644 index 00000000..3f3b1ef1 --- /dev/null +++ b/src/browser/webapi/element/html/Time.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Time = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *Time) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Time) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Time); + + pub const Meta = struct { + pub const name = "HTMLTimeElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +}; diff --git a/src/browser/webapi/element/html/Track.zig b/src/browser/webapi/element/html/Track.zig new file mode 100644 index 00000000..5653a89b --- /dev/null +++ b/src/browser/webapi/element/html/Track.zig @@ -0,0 +1,25 @@ +const js = @import("../../../js/js.zig"); +const Node = @import("../../Node.zig"); +const Element = @import("../../Element.zig"); +const HtmlElement = @import("../Html.zig"); + +const Track = @This(); + +_proto: *HtmlElement, + +pub fn asElement(self: *Track) *Element { + return self._proto._proto; +} +pub fn asNode(self: *Track) *Node { + return self.asElement().asNode(); +} + +pub const JsApi = struct { + pub const bridge = js.Bridge(Track); + + pub const Meta = struct { + pub const name = "HTMLTrackElement"; + pub const prototype_chain = bridge.prototypeChain(); + pub var class_id: bridge.ClassId = undefined; + }; +};