mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
27 lines
514 B
Zig
27 lines
514 B
Zig
const std = @import("std");
|
|
|
|
const parser = @import("../parser.zig");
|
|
|
|
const Node = @import("node.zig").Node;
|
|
|
|
pub const Element = struct {
|
|
proto: Node,
|
|
base: *parser.Element,
|
|
|
|
pub const prototype = *Node;
|
|
|
|
pub fn init(base: *parser.Element) Element {
|
|
return .{
|
|
.proto = Node.init(null),
|
|
.base = base,
|
|
};
|
|
}
|
|
|
|
// JS funcs
|
|
// --------
|
|
|
|
pub fn get_localName(self: Element) []const u8 {
|
|
return parser.elementLocalName(self.base);
|
|
}
|
|
};
|