mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-18 09:58:10 +00:00
netsurf: move to public only API
And add some Node APIs: - getters: firstChild, lastChild, nextSibling, previoussibling, parentNode, parentElement, nodeName, nodeType, ownerDocument, isConnected - getters/setters: nodeValue, textContent - methods: appendChild And some test comptime optimizations on Document Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
This commit is contained in:
@@ -454,7 +454,8 @@ pub const HTMLVideoElement = struct {
|
||||
pub const mem_guarantied = true;
|
||||
};
|
||||
|
||||
pub fn toInterface(comptime T: type, elem: *parser.Element) T {
|
||||
pub fn toInterface(comptime T: type, e: *parser.Element) T {
|
||||
const elem: *align(@alignOf(*parser.Element)) parser.Element = @alignCast(e);
|
||||
const tag = parser.elementHTMLGetTagType(@as(*parser.ElementHTML, @ptrCast(elem)));
|
||||
return switch (tag) {
|
||||
.a => .{ .HTMLAnchorElement = @as(*parser.Anchor, @ptrCast(elem)) },
|
||||
|
||||
Reference in New Issue
Block a user