mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-04 14:33:47 +00:00
Adds a number of HTML elements
Instead of being mapped to HTMLUnknownElement, these will all be mapped to the correct type. This is important for many WPT tests. But it's not impossible that some script checks `if (x instanceof HTMLBaseElement)` and, without this, that would error since HTMLBaseElement wouldn't be defined.
This commit is contained in:
@@ -1364,6 +1364,12 @@ pub fn createElementNS(self: *Page, namespace: Element.Namespace, name: []const
|
|||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "i", .{}) catch unreachable, ._tag = .i },
|
.{ ._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(
|
's' => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.Generic,
|
||||||
namespace,
|
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 },
|
.{ ._proto = undefined, ._tag_name = String.init(undefined, "dt", .{}) catch unreachable, ._tag = .dt },
|
||||||
),
|
),
|
||||||
asUint("td") => return self.createHtmlElementT(
|
asUint("td") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.TableCell,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "td", .{}) catch unreachable, ._tag = .td },
|
.{ ._proto = undefined, ._tag_name = String.init(undefined, "td", .{}) catch unreachable, ._tag = .td },
|
||||||
),
|
),
|
||||||
asUint("th") => return self.createHtmlElementT(
|
asUint("th") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.TableCell,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "th", .{}) catch unreachable, ._tag = .th },
|
.{ ._proto = undefined, ._tag_name = String.init(undefined, "th", .{}) catch unreachable, ._tag = .th },
|
||||||
),
|
),
|
||||||
asUint("tr") => return self.createHtmlElementT(
|
asUint("tr") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.TableRow,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "tr", .{}) catch unreachable, ._tag = .tr },
|
.{ ._proto = undefined },
|
||||||
),
|
),
|
||||||
else => {},
|
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 },
|
.{ ._proto = undefined, ._tag_name = String.init(undefined, "nav", .{}) catch unreachable, ._tag = .nav },
|
||||||
),
|
),
|
||||||
asUint("del") => return self.createHtmlElementT(
|
asUint("del") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.Mod,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "del", .{}) catch unreachable, ._tag = .del },
|
.{ ._proto = undefined, ._tag_name = String.init(undefined, "del", .{}) catch unreachable, ._tag = .del },
|
||||||
),
|
),
|
||||||
asUint("ins") => return self.createHtmlElementT(
|
asUint("ins") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.Mod,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "ins", .{}) catch unreachable, ._tag = .ins },
|
.{ ._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(
|
asUint("sub") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.Generic,
|
||||||
namespace,
|
namespace,
|
||||||
@@ -1536,10 +1566,10 @@ pub fn createElementNS(self: *Page, namespace: Element.Namespace, name: []const
|
|||||||
},
|
},
|
||||||
4 => switch (@as(u32, @bitCast(name[0..4].*))) {
|
4 => switch (@as(u32, @bitCast(name[0..4].*))) {
|
||||||
asUint("span") => return self.createHtmlElementT(
|
asUint("span") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.Span,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "span", .{}) catch unreachable, ._tag = .span },
|
.{ ._proto = undefined },
|
||||||
),
|
),
|
||||||
asUint("meta") => return self.createHtmlElementT(
|
asUint("meta") => return self.createHtmlElementT(
|
||||||
Element.Html.Meta,
|
Element.Html.Meta,
|
||||||
@@ -1597,10 +1627,10 @@ pub fn createElementNS(self: *Page, namespace: Element.Namespace, name: []const
|
|||||||
),
|
),
|
||||||
asUint("base") => {
|
asUint("base") => {
|
||||||
const n = try self.createHtmlElementT(
|
const n = try self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.Base,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
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
|
// 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 },
|
.{ ._proto = undefined, ._tag_name = String.init(undefined, "menu", .{}) catch unreachable, ._tag = .menu },
|
||||||
),
|
),
|
||||||
asUint("area") => return self.createHtmlElementT(
|
asUint("area") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.Area,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
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(
|
asUint("code") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
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 },
|
.{ ._proto = undefined, ._tag_name = String.init(undefined, "code", .{}) catch unreachable, ._tag = .code },
|
||||||
),
|
),
|
||||||
asUint("time") => return self.createHtmlElementT(
|
asUint("time") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.Time,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "time", .{}) catch unreachable, ._tag = .time },
|
.{ ._proto = undefined },
|
||||||
),
|
),
|
||||||
else => {},
|
else => {},
|
||||||
},
|
},
|
||||||
@@ -1680,36 +1716,54 @@ pub fn createElementNS(self: *Page, namespace: Element.Namespace, name: []const
|
|||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "aside", .{}) catch unreachable, ._tag = .aside },
|
.{ ._proto = undefined, ._tag_name = String.init(undefined, "aside", .{}) catch unreachable, ._tag = .aside },
|
||||||
),
|
),
|
||||||
asUint("meter") => return self.createHtmlElementT(
|
asUint("label") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.Label,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
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(
|
asUint("table") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.Table,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "table", .{}) catch unreachable, ._tag = .table },
|
.{ ._proto = undefined },
|
||||||
),
|
),
|
||||||
asUint("thead") => return self.createHtmlElementT(
|
asUint("thead") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.TableSection,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "thead", .{}) catch unreachable, ._tag = .thead },
|
.{ ._proto = undefined, ._tag_name = String.init(undefined, "thead", .{}) catch unreachable, ._tag = .thead },
|
||||||
),
|
),
|
||||||
asUint("tbody") => return self.createHtmlElementT(
|
asUint("tbody") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.TableSection,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "tbody", .{}) catch unreachable, ._tag = .tbody },
|
.{ ._proto = undefined, ._tag_name = String.init(undefined, "tbody", .{}) catch unreachable, ._tag = .tbody },
|
||||||
),
|
),
|
||||||
asUint("tfoot") => return self.createHtmlElementT(
|
asUint("tfoot") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.TableSection,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "tfoot", .{}) catch unreachable, ._tag = .tfoot },
|
.{ ._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 => {},
|
else => {},
|
||||||
},
|
},
|
||||||
6 => switch (@as(u48, @bitCast(name[0..6].*))) {
|
6 => switch (@as(u48, @bitCast(name[0..6].*))) {
|
||||||
@@ -1737,6 +1791,30 @@ pub fn createElementNS(self: *Page, namespace: Element.Namespace, name: []const
|
|||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined },
|
.{ ._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(
|
asUint("strong") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.Generic,
|
||||||
namespace,
|
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 },
|
.{ ._proto = undefined, ._tag_name = String.init(undefined, "summary", .{}) catch unreachable, ._tag = .summary },
|
||||||
),
|
),
|
||||||
asUint("caption") => return self.createHtmlElementT(
|
asUint("caption") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.TableCaption,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "caption", .{}) catch unreachable, ._tag = .caption },
|
.{ ._proto = undefined },
|
||||||
),
|
),
|
||||||
asUint("marquee") => return self.createHtmlElementT(
|
asUint("marquee") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.Generic,
|
||||||
@@ -1845,35 +1923,41 @@ pub fn createElementNS(self: *Page, namespace: Element.Namespace, name: []const
|
|||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._content = undefined },
|
.{ ._proto = undefined, ._content = undefined },
|
||||||
),
|
),
|
||||||
asUint("fieldset") => return self.createHtmlElementT(
|
asUint("colgroup") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.TableCol,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
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(
|
asUint("optgroup") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.OptGroup,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "optgroup", .{}) catch unreachable, ._tag = .optgroup },
|
.{ ._proto = undefined },
|
||||||
),
|
),
|
||||||
asUint("progress") => return self.createHtmlElementT(
|
asUint("progress") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.Progress,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "progress", .{}) catch unreachable, ._tag = .progress },
|
.{ ._proto = undefined },
|
||||||
),
|
),
|
||||||
asUint("datalist") => return self.createHtmlElementT(
|
asUint("datalist") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.DataList,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "datalist", .{}) catch unreachable, ._tag = .datalist },
|
.{ ._proto = undefined },
|
||||||
),
|
),
|
||||||
else => {},
|
else => {},
|
||||||
},
|
},
|
||||||
10 => switch (@as(u80, @bitCast(name[0..10].*))) {
|
10 => switch (@as(u80, @bitCast(name[0..10].*))) {
|
||||||
asUint("blockquote") => return self.createHtmlElementT(
|
asUint("blockquote") => return self.createHtmlElementT(
|
||||||
Element.Html.Generic,
|
Element.Html.Quote,
|
||||||
namespace,
|
namespace,
|
||||||
attribute_iterator,
|
attribute_iterator,
|
||||||
.{ ._proto = undefined, ._tag_name = String.init(undefined, "blockquote", .{}) catch unreachable, ._tag = .blockquote },
|
.{ ._proto = undefined, ._tag_name = String.init(undefined, "blockquote", .{}) catch unreachable, ._tag = .blockquote },
|
||||||
|
|||||||
@@ -529,16 +529,22 @@ pub const JsApis = flattenTypes(&.{
|
|||||||
@import("../webapi/element/Html.zig"),
|
@import("../webapi/element/Html.zig"),
|
||||||
@import("../webapi/element/html/IFrame.zig"),
|
@import("../webapi/element/html/IFrame.zig"),
|
||||||
@import("../webapi/element/html/Anchor.zig"),
|
@import("../webapi/element/html/Anchor.zig"),
|
||||||
|
@import("../webapi/element/html/Area.zig"),
|
||||||
@import("../webapi/element/html/Audio.zig"),
|
@import("../webapi/element/html/Audio.zig"),
|
||||||
|
@import("../webapi/element/html/Base.zig"),
|
||||||
@import("../webapi/element/html/Body.zig"),
|
@import("../webapi/element/html/Body.zig"),
|
||||||
@import("../webapi/element/html/BR.zig"),
|
@import("../webapi/element/html/BR.zig"),
|
||||||
@import("../webapi/element/html/Button.zig"),
|
@import("../webapi/element/html/Button.zig"),
|
||||||
@import("../webapi/element/html/Canvas.zig"),
|
@import("../webapi/element/html/Canvas.zig"),
|
||||||
@import("../webapi/element/html/Custom.zig"),
|
@import("../webapi/element/html/Custom.zig"),
|
||||||
@import("../webapi/element/html/Data.zig"),
|
@import("../webapi/element/html/Data.zig"),
|
||||||
|
@import("../webapi/element/html/DataList.zig"),
|
||||||
@import("../webapi/element/html/Dialog.zig"),
|
@import("../webapi/element/html/Dialog.zig"),
|
||||||
|
@import("../webapi/element/html/Directory.zig"),
|
||||||
@import("../webapi/element/html/Div.zig"),
|
@import("../webapi/element/html/Div.zig"),
|
||||||
@import("../webapi/element/html/Embed.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/Form.zig"),
|
||||||
@import("../webapi/element/html/Generic.zig"),
|
@import("../webapi/element/html/Generic.zig"),
|
||||||
@import("../webapi/element/html/Head.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/Html.zig"),
|
||||||
@import("../webapi/element/html/Image.zig"),
|
@import("../webapi/element/html/Image.zig"),
|
||||||
@import("../webapi/element/html/Input.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/LI.zig"),
|
||||||
@import("../webapi/element/html/Link.zig"),
|
@import("../webapi/element/html/Link.zig"),
|
||||||
|
@import("../webapi/element/html/Map.zig"),
|
||||||
@import("../webapi/element/html/Media.zig"),
|
@import("../webapi/element/html/Media.zig"),
|
||||||
@import("../webapi/element/html/Meta.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/OL.zig"),
|
||||||
|
@import("../webapi/element/html/OptGroup.zig"),
|
||||||
@import("../webapi/element/html/Option.zig"),
|
@import("../webapi/element/html/Option.zig"),
|
||||||
|
@import("../webapi/element/html/Output.zig"),
|
||||||
@import("../webapi/element/html/Paragraph.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/Script.zig"),
|
||||||
@import("../webapi/element/html/Select.zig"),
|
@import("../webapi/element/html/Select.zig"),
|
||||||
@import("../webapi/element/html/Slot.zig"),
|
@import("../webapi/element/html/Slot.zig"),
|
||||||
|
@import("../webapi/element/html/Source.zig"),
|
||||||
@import("../webapi/element/html/Span.zig"),
|
@import("../webapi/element/html/Span.zig"),
|
||||||
@import("../webapi/element/html/Style.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/Template.zig"),
|
||||||
@import("../webapi/element/html/TextArea.zig"),
|
@import("../webapi/element/html/TextArea.zig"),
|
||||||
|
@import("../webapi/element/html/Time.zig"),
|
||||||
@import("../webapi/element/html/Title.zig"),
|
@import("../webapi/element/html/Title.zig"),
|
||||||
|
@import("../webapi/element/html/Track.zig"),
|
||||||
@import("../webapi/element/html/Video.zig"),
|
@import("../webapi/element/html/Video.zig"),
|
||||||
@import("../webapi/element/html/UL.zig"),
|
@import("../webapi/element/html/UL.zig"),
|
||||||
@import("../webapi/element/html/Unknown.zig"),
|
@import("../webapi/element/html/Unknown.zig"),
|
||||||
|
|||||||
@@ -191,15 +191,21 @@ pub fn getTagNameLower(self: *const Element) []const u8 {
|
|||||||
},
|
},
|
||||||
else => return switch (he._type) {
|
else => return switch (he._type) {
|
||||||
.anchor => "a",
|
.anchor => "a",
|
||||||
|
.area => "area",
|
||||||
|
.base => "base",
|
||||||
.body => "body",
|
.body => "body",
|
||||||
.br => "br",
|
.br => "br",
|
||||||
.button => "button",
|
.button => "button",
|
||||||
.canvas => "canvas",
|
.canvas => "canvas",
|
||||||
.custom => |e| e._tag_name.str(),
|
.custom => |e| e._tag_name.str(),
|
||||||
.data => "data",
|
.data => "data",
|
||||||
|
.datalist => "datalist",
|
||||||
.dialog => "dialog",
|
.dialog => "dialog",
|
||||||
|
.directory => "dir",
|
||||||
.div => "div",
|
.div => "div",
|
||||||
.embed => "embed",
|
.embed => "embed",
|
||||||
|
.fieldset => "fieldset",
|
||||||
|
.font => "font",
|
||||||
.form => "form",
|
.form => "form",
|
||||||
.generic => |e| e._tag_name.str(),
|
.generic => |e| e._tag_name.str(),
|
||||||
.heading => |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",
|
.iframe => "iframe",
|
||||||
.img => "img",
|
.img => "img",
|
||||||
.input => "input",
|
.input => "input",
|
||||||
|
.label => "label",
|
||||||
|
.legend => "legend",
|
||||||
.li => "li",
|
.li => "li",
|
||||||
.link => "link",
|
.link => "link",
|
||||||
|
.map => "map",
|
||||||
.media => |m| switch (m._type) {
|
.media => |m| switch (m._type) {
|
||||||
.audio => "audio",
|
.audio => "audio",
|
||||||
.video => "video",
|
.video => "video",
|
||||||
.generic => "media",
|
.generic => "media",
|
||||||
},
|
},
|
||||||
.meta => "meta",
|
.meta => "meta",
|
||||||
|
.meter => "meter",
|
||||||
|
.mod => |e| e._tag_name.str(),
|
||||||
|
.object => "object",
|
||||||
.ol => "ol",
|
.ol => "ol",
|
||||||
|
.optgroup => "optgroup",
|
||||||
.option => "option",
|
.option => "option",
|
||||||
|
.output => "output",
|
||||||
.p => "p",
|
.p => "p",
|
||||||
|
.param => "param",
|
||||||
|
.pre => "pre",
|
||||||
|
.progress => "progress",
|
||||||
|
.quote => |e| e._tag_name.str(),
|
||||||
.script => "script",
|
.script => "script",
|
||||||
.select => "select",
|
.select => "select",
|
||||||
.slot => "slot",
|
.slot => "slot",
|
||||||
|
.source => "source",
|
||||||
.span => "span",
|
.span => "span",
|
||||||
.style => "style",
|
.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",
|
.template => "template",
|
||||||
.textarea => "textarea",
|
.textarea => "textarea",
|
||||||
|
.time => "time",
|
||||||
.title => "title",
|
.title => "title",
|
||||||
|
.track => "track",
|
||||||
.ul => "ul",
|
.ul => "ul",
|
||||||
.unknown => |e| e._tag_name.str(),
|
.unknown => |e| e._tag_name.str(),
|
||||||
},
|
},
|
||||||
@@ -240,15 +267,21 @@ pub fn getTagNameSpec(self: *const Element, buf: []u8) []const u8 {
|
|||||||
return switch (self._type) {
|
return switch (self._type) {
|
||||||
.html => |he| switch (he._type) {
|
.html => |he| switch (he._type) {
|
||||||
.anchor => "A",
|
.anchor => "A",
|
||||||
|
.area => "AREA",
|
||||||
|
.base => "BASE",
|
||||||
.body => "BODY",
|
.body => "BODY",
|
||||||
.br => "BR",
|
.br => "BR",
|
||||||
.button => "BUTTON",
|
.button => "BUTTON",
|
||||||
.canvas => "CANVAS",
|
.canvas => "CANVAS",
|
||||||
.custom => |e| upperTagName(&e._tag_name, buf),
|
.custom => |e| upperTagName(&e._tag_name, buf),
|
||||||
.data => "DATA",
|
.data => "DATA",
|
||||||
|
.datalist => "DATALIST",
|
||||||
.dialog => "DIALOG",
|
.dialog => "DIALOG",
|
||||||
|
.directory => "DIR",
|
||||||
.div => "DIV",
|
.div => "DIV",
|
||||||
.embed => "EMBED",
|
.embed => "EMBED",
|
||||||
|
.fieldset => "FIELDSET",
|
||||||
|
.font => "FONT",
|
||||||
.form => "FORM",
|
.form => "FORM",
|
||||||
.generic => |e| upperTagName(&e._tag_name, buf),
|
.generic => |e| upperTagName(&e._tag_name, buf),
|
||||||
.heading => |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",
|
.iframe => "IFRAME",
|
||||||
.img => "IMG",
|
.img => "IMG",
|
||||||
.input => "INPUT",
|
.input => "INPUT",
|
||||||
|
.label => "LABEL",
|
||||||
|
.legend => "LEGEND",
|
||||||
.li => "LI",
|
.li => "LI",
|
||||||
.link => "LINK",
|
.link => "LINK",
|
||||||
|
.map => "MAP",
|
||||||
.meta => "META",
|
.meta => "META",
|
||||||
.media => |m| switch (m._type) {
|
.media => |m| switch (m._type) {
|
||||||
.audio => "AUDIO",
|
.audio => "AUDIO",
|
||||||
.video => "VIDEO",
|
.video => "VIDEO",
|
||||||
.generic => "MEDIA",
|
.generic => "MEDIA",
|
||||||
},
|
},
|
||||||
|
.meter => "METER",
|
||||||
|
.mod => |e| upperTagName(&e._tag_name, buf),
|
||||||
|
.object => "OBJECT",
|
||||||
.ol => "OL",
|
.ol => "OL",
|
||||||
|
.optgroup => "OPTGROUP",
|
||||||
.option => "OPTION",
|
.option => "OPTION",
|
||||||
|
.output => "OUTPUT",
|
||||||
.p => "P",
|
.p => "P",
|
||||||
|
.param => "PARAM",
|
||||||
|
.pre => "PRE",
|
||||||
|
.progress => "PROGRESS",
|
||||||
|
.quote => |e| upperTagName(&e._tag_name, buf),
|
||||||
.script => "SCRIPT",
|
.script => "SCRIPT",
|
||||||
.select => "SELECT",
|
.select => "SELECT",
|
||||||
.slot => "SLOT",
|
.slot => "SLOT",
|
||||||
|
.source => "SOURCE",
|
||||||
.span => "SPAN",
|
.span => "SPAN",
|
||||||
.style => "STYLE",
|
.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",
|
.template => "TEMPLATE",
|
||||||
.textarea => "TEXTAREA",
|
.textarea => "TEXTAREA",
|
||||||
|
.time => "TIME",
|
||||||
.title => "TITLE",
|
.title => "TITLE",
|
||||||
|
.track => "TRACK",
|
||||||
.ul => "UL",
|
.ul => "UL",
|
||||||
.unknown => |e| switch (self._namespace) {
|
.unknown => |e| switch (self._namespace) {
|
||||||
.html => upperTagName(&e._tag_name, buf),
|
.html => upperTagName(&e._tag_name, buf),
|
||||||
@@ -1074,35 +1128,62 @@ pub fn getTag(self: *const Element) Tag {
|
|||||||
return switch (self._type) {
|
return switch (self._type) {
|
||||||
.html => |he| switch (he._type) {
|
.html => |he| switch (he._type) {
|
||||||
.anchor => .anchor,
|
.anchor => .anchor,
|
||||||
|
.area => .area,
|
||||||
|
.base => .base,
|
||||||
.div => .div,
|
.div => .div,
|
||||||
.embed => .embed,
|
.embed => .embed,
|
||||||
.form => .form,
|
.form => .form,
|
||||||
.p => .p,
|
.p => .p,
|
||||||
.custom => .custom,
|
.custom => .custom,
|
||||||
.data => .data,
|
.data => .data,
|
||||||
|
.datalist => .datalist,
|
||||||
.dialog => .dialog,
|
.dialog => .dialog,
|
||||||
|
.directory => .unknown,
|
||||||
.iframe => .iframe,
|
.iframe => .iframe,
|
||||||
.img => .img,
|
.img => .img,
|
||||||
.br => .br,
|
.br => .br,
|
||||||
.button => .button,
|
.button => .button,
|
||||||
.canvas => .canvas,
|
.canvas => .canvas,
|
||||||
|
.fieldset => .fieldset,
|
||||||
|
.font => .unknown,
|
||||||
.heading => |h| h._tag,
|
.heading => |h| h._tag,
|
||||||
|
.label => .unknown,
|
||||||
|
.legend => .unknown,
|
||||||
.li => .li,
|
.li => .li,
|
||||||
|
.map => .unknown,
|
||||||
.ul => .ul,
|
.ul => .ul,
|
||||||
.ol => .ol,
|
.ol => .ol,
|
||||||
|
.object => .unknown,
|
||||||
|
.optgroup => .optgroup,
|
||||||
|
.output => .unknown,
|
||||||
|
.param => .unknown,
|
||||||
|
.pre => .unknown,
|
||||||
.generic => |g| g._tag,
|
.generic => |g| g._tag,
|
||||||
.media => |m| switch (m._type) {
|
.media => |m| switch (m._type) {
|
||||||
.audio => .audio,
|
.audio => .audio,
|
||||||
.video => .video,
|
.video => .video,
|
||||||
.generic => .media,
|
.generic => .media,
|
||||||
},
|
},
|
||||||
|
.meter => .meter,
|
||||||
|
.mod => |m| m._tag,
|
||||||
|
.progress => .progress,
|
||||||
|
.quote => |q| q._tag,
|
||||||
.script => .script,
|
.script => .script,
|
||||||
.select => .select,
|
.select => .select,
|
||||||
.slot => .slot,
|
.slot => .slot,
|
||||||
|
.source => .unknown,
|
||||||
.span => .span,
|
.span => .span,
|
||||||
.option => .option,
|
.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,
|
.template => .template,
|
||||||
.textarea => .textarea,
|
.textarea => .textarea,
|
||||||
|
.time => .time,
|
||||||
|
.track => .unknown,
|
||||||
.input => .input,
|
.input => .input,
|
||||||
.link => .link,
|
.link => .link,
|
||||||
.meta => .meta,
|
.meta => .meta,
|
||||||
|
|||||||
@@ -217,8 +217,8 @@ fn getDefaultDisplay(element: *const Element) []const u8 {
|
|||||||
switch (element._type) {
|
switch (element._type) {
|
||||||
.html => |html| {
|
.html => |html| {
|
||||||
return switch (html._type) {
|
return switch (html._type) {
|
||||||
.anchor, .br, .span => "inline",
|
.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 => "block",
|
.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: {
|
.generic, .custom, .unknown, .data => blk: {
|
||||||
const tag = element.getTagNameLower();
|
const tag = element.getTagNameLower();
|
||||||
if (isInlineTag(tag)) break :blk "inline";
|
if (isInlineTag(tag)) break :blk "inline";
|
||||||
|
|||||||
@@ -25,15 +25,21 @@ const Node = @import("../Node.zig");
|
|||||||
const Element = @import("../Element.zig");
|
const Element = @import("../Element.zig");
|
||||||
|
|
||||||
pub const Anchor = @import("html/Anchor.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 Body = @import("html/Body.zig");
|
||||||
pub const BR = @import("html/BR.zig");
|
pub const BR = @import("html/BR.zig");
|
||||||
pub const Button = @import("html/Button.zig");
|
pub const Button = @import("html/Button.zig");
|
||||||
pub const Canvas = @import("html/Canvas.zig");
|
pub const Canvas = @import("html/Canvas.zig");
|
||||||
pub const Custom = @import("html/Custom.zig");
|
pub const Custom = @import("html/Custom.zig");
|
||||||
pub const Data = @import("html/Data.zig");
|
pub const Data = @import("html/Data.zig");
|
||||||
|
pub const DataList = @import("html/DataList.zig");
|
||||||
pub const Dialog = @import("html/Dialog.zig");
|
pub const Dialog = @import("html/Dialog.zig");
|
||||||
|
pub const Directory = @import("html/Directory.zig");
|
||||||
pub const Div = @import("html/Div.zig");
|
pub const Div = @import("html/Div.zig");
|
||||||
pub const Embed = @import("html/Embed.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 Form = @import("html/Form.zig");
|
||||||
pub const Generic = @import("html/Generic.zig");
|
pub const Generic = @import("html/Generic.zig");
|
||||||
pub const Head = @import("html/Head.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 IFrame = @import("html/IFrame.zig");
|
||||||
pub const Image = @import("html/Image.zig");
|
pub const Image = @import("html/Image.zig");
|
||||||
pub const Input = @import("html/Input.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 LI = @import("html/LI.zig");
|
||||||
pub const Link = @import("html/Link.zig");
|
pub const Link = @import("html/Link.zig");
|
||||||
|
pub const Map = @import("html/Map.zig");
|
||||||
pub const Media = @import("html/Media.zig");
|
pub const Media = @import("html/Media.zig");
|
||||||
pub const Meta = @import("html/Meta.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 OL = @import("html/OL.zig");
|
||||||
|
pub const OptGroup = @import("html/OptGroup.zig");
|
||||||
pub const Option = @import("html/Option.zig");
|
pub const Option = @import("html/Option.zig");
|
||||||
|
pub const Output = @import("html/Output.zig");
|
||||||
pub const Paragraph = @import("html/Paragraph.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 Script = @import("html/Script.zig");
|
||||||
pub const Select = @import("html/Select.zig");
|
pub const Select = @import("html/Select.zig");
|
||||||
pub const Slot = @import("html/Slot.zig");
|
pub const Slot = @import("html/Slot.zig");
|
||||||
|
pub const Source = @import("html/Source.zig");
|
||||||
pub const Span = @import("html/Span.zig");
|
pub const Span = @import("html/Span.zig");
|
||||||
pub const Style = @import("html/Style.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 Template = @import("html/Template.zig");
|
||||||
pub const TextArea = @import("html/TextArea.zig");
|
pub const TextArea = @import("html/TextArea.zig");
|
||||||
|
pub const Time = @import("html/Time.zig");
|
||||||
pub const Title = @import("html/Title.zig");
|
pub const Title = @import("html/Title.zig");
|
||||||
|
pub const Track = @import("html/Track.zig");
|
||||||
pub const UL = @import("html/UL.zig");
|
pub const UL = @import("html/UL.zig");
|
||||||
pub const Unknown = @import("html/Unknown.zig");
|
pub const Unknown = @import("html/Unknown.zig");
|
||||||
|
|
||||||
@@ -74,15 +101,21 @@ pub fn construct(page: *Page) !*Element {
|
|||||||
|
|
||||||
pub const Type = union(enum) {
|
pub const Type = union(enum) {
|
||||||
anchor: *Anchor,
|
anchor: *Anchor,
|
||||||
|
area: *Area,
|
||||||
|
base: *Base,
|
||||||
body: *Body,
|
body: *Body,
|
||||||
br: *BR,
|
br: *BR,
|
||||||
button: *Button,
|
button: *Button,
|
||||||
canvas: *Canvas,
|
canvas: *Canvas,
|
||||||
custom: *Custom,
|
custom: *Custom,
|
||||||
data: *Data,
|
data: *Data,
|
||||||
|
datalist: *DataList,
|
||||||
dialog: *Dialog,
|
dialog: *Dialog,
|
||||||
|
directory: *Directory,
|
||||||
div: *Div,
|
div: *Div,
|
||||||
embed: *Embed,
|
embed: *Embed,
|
||||||
|
fieldset: *FieldSet,
|
||||||
|
font: *Font,
|
||||||
form: *Form,
|
form: *Form,
|
||||||
generic: *Generic,
|
generic: *Generic,
|
||||||
heading: *Heading,
|
heading: *Heading,
|
||||||
@@ -92,21 +125,42 @@ pub const Type = union(enum) {
|
|||||||
img: *Image,
|
img: *Image,
|
||||||
iframe: *IFrame,
|
iframe: *IFrame,
|
||||||
input: *Input,
|
input: *Input,
|
||||||
|
label: *Label,
|
||||||
|
legend: *Legend,
|
||||||
li: *LI,
|
li: *LI,
|
||||||
link: *Link,
|
link: *Link,
|
||||||
|
map: *Map,
|
||||||
media: *Media,
|
media: *Media,
|
||||||
meta: *Meta,
|
meta: *Meta,
|
||||||
|
meter: *Meter,
|
||||||
|
mod: *Mod,
|
||||||
|
object: *Object,
|
||||||
ol: *OL,
|
ol: *OL,
|
||||||
|
optgroup: *OptGroup,
|
||||||
option: *Option,
|
option: *Option,
|
||||||
|
output: *Output,
|
||||||
p: *Paragraph,
|
p: *Paragraph,
|
||||||
|
param: *Param,
|
||||||
|
pre: *Pre,
|
||||||
|
progress: *Progress,
|
||||||
|
quote: *Quote,
|
||||||
script: *Script,
|
script: *Script,
|
||||||
select: *Select,
|
select: *Select,
|
||||||
slot: *Slot,
|
slot: *Slot,
|
||||||
|
source: *Source,
|
||||||
span: *Span,
|
span: *Span,
|
||||||
style: *Style,
|
style: *Style,
|
||||||
|
table: *Table,
|
||||||
|
table_caption: *TableCaption,
|
||||||
|
table_cell: *TableCell,
|
||||||
|
table_col: *TableCol,
|
||||||
|
table_row: *TableRow,
|
||||||
|
table_section: *TableSection,
|
||||||
template: *Template,
|
template: *Template,
|
||||||
textarea: *TextArea,
|
textarea: *TextArea,
|
||||||
|
time: *Time,
|
||||||
title: *Title,
|
title: *Title,
|
||||||
|
track: *Track,
|
||||||
ul: *UL,
|
ul: *UL,
|
||||||
unknown: *Unknown,
|
unknown: *Unknown,
|
||||||
};
|
};
|
||||||
|
|||||||
25
src/browser/webapi/element/html/Area.zig
Normal file
25
src/browser/webapi/element/html/Area.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/Base.zig
Normal file
25
src/browser/webapi/element/html/Base.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/DataList.zig
Normal file
25
src/browser/webapi/element/html/DataList.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/Directory.zig
Normal file
25
src/browser/webapi/element/html/Directory.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/FieldSet.zig
Normal file
25
src/browser/webapi/element/html/FieldSet.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/Font.zig
Normal file
25
src/browser/webapi/element/html/Font.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/Label.zig
Normal file
25
src/browser/webapi/element/html/Label.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/Legend.zig
Normal file
25
src/browser/webapi/element/html/Legend.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/Map.zig
Normal file
25
src/browser/webapi/element/html/Map.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/Meter.zig
Normal file
25
src/browser/webapi/element/html/Meter.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
28
src/browser/webapi/element/html/Mod.zig
Normal file
28
src/browser/webapi/element/html/Mod.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/Object.zig
Normal file
25
src/browser/webapi/element/html/Object.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/OptGroup.zig
Normal file
25
src/browser/webapi/element/html/OptGroup.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/Output.zig
Normal file
25
src/browser/webapi/element/html/Output.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/Param.zig
Normal file
25
src/browser/webapi/element/html/Param.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/Pre.zig
Normal file
25
src/browser/webapi/element/html/Pre.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/Progress.zig
Normal file
25
src/browser/webapi/element/html/Progress.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
28
src/browser/webapi/element/html/Quote.zig
Normal file
28
src/browser/webapi/element/html/Quote.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/Source.zig
Normal file
25
src/browser/webapi/element/html/Source.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/Table.zig
Normal file
25
src/browser/webapi/element/html/Table.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/TableCaption.zig
Normal file
25
src/browser/webapi/element/html/TableCaption.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
28
src/browser/webapi/element/html/TableCell.zig
Normal file
28
src/browser/webapi/element/html/TableCell.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
28
src/browser/webapi/element/html/TableCol.zig
Normal file
28
src/browser/webapi/element/html/TableCol.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/TableRow.zig
Normal file
25
src/browser/webapi/element/html/TableRow.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
28
src/browser/webapi/element/html/TableSection.zig
Normal file
28
src/browser/webapi/element/html/TableSection.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/Time.zig
Normal file
25
src/browser/webapi/element/html/Time.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
25
src/browser/webapi/element/html/Track.zig
Normal file
25
src/browser/webapi/element/html/Track.zig
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user