mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 07:31:47 +00:00
Implement HTMLDocument.createElement
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
This commit is contained in:
@@ -1,13 +1,8 @@
|
||||
const std = @import("std");
|
||||
|
||||
const jsruntime = @import("jsruntime");
|
||||
const Case = jsruntime.test_utils.Case;
|
||||
const checkCases = jsruntime.test_utils.checkCases;
|
||||
|
||||
const parser = @import("../parser.zig");
|
||||
|
||||
const DOM = @import("../dom.zig");
|
||||
const Node = DOM.Node;
|
||||
const Node = @import("node.zig").Node;
|
||||
|
||||
pub const Element = struct {
|
||||
proto: Node,
|
||||
@@ -29,26 +24,3 @@ pub const Element = struct {
|
||||
return parser.elementLocalName(self.base);
|
||||
}
|
||||
};
|
||||
|
||||
// HTML elements
|
||||
// -------------
|
||||
|
||||
pub const HTMLElement = struct {
|
||||
proto: Element,
|
||||
|
||||
pub const prototype = *Element;
|
||||
|
||||
pub fn init(elem_base: *parser.Element) HTMLElement {
|
||||
return .{ .proto = Element.init(elem_base) };
|
||||
}
|
||||
};
|
||||
|
||||
pub const HTMLBodyElement = struct {
|
||||
proto: HTMLElement,
|
||||
|
||||
pub const prototype = *HTMLElement;
|
||||
|
||||
pub fn init(elem_base: *parser.Element) HTMLBodyElement {
|
||||
return .{ .proto = HTMLElement.init(elem_base) };
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user