mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-17 08:48:58 +00:00
dom: add document.createElement and document.getElementById
This commit is contained in:
@@ -3,12 +3,18 @@ const std = @import("std");
|
||||
const parser = @import("../netsurf.zig");
|
||||
|
||||
const Node = @import("node.zig").Node;
|
||||
const Union = @import("node.zig").Union;
|
||||
|
||||
pub const Element = struct {
|
||||
pub const Self = parser.Element;
|
||||
pub const prototype = *Node;
|
||||
pub const mem_guarantied = true;
|
||||
|
||||
pub fn toInterface(e: *parser.Element) Union {
|
||||
const n = @as(*parser.Node, @ptrCast(e));
|
||||
return Node.toInterface(n);
|
||||
}
|
||||
|
||||
// JS funcs
|
||||
// --------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user