mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 07:31:47 +00:00
Applies changes from jsruntime Self and mem_guaranteed
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
This commit is contained in:
@@ -5,22 +5,14 @@ const parser = @import("../parser.zig");
|
||||
const Node = @import("node.zig").Node;
|
||||
|
||||
pub const Element = struct {
|
||||
proto: Node,
|
||||
base: *parser.Element,
|
||||
|
||||
pub const Self = parser.Element;
|
||||
pub const prototype = *Node;
|
||||
|
||||
pub fn init(base: *parser.Element) Element {
|
||||
return .{
|
||||
.proto = Node.init(null),
|
||||
.base = base,
|
||||
};
|
||||
}
|
||||
pub const mem_guarantied = true;
|
||||
|
||||
// JS funcs
|
||||
// --------
|
||||
|
||||
pub fn get_localName(self: Element) []const u8 {
|
||||
return parser.elementLocalName(self.base);
|
||||
pub fn get_localName(self: *parser.Element) []const u8 {
|
||||
return parser.elementLocalName(self);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user