mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-17 08:48:58 +00:00
netsurf: remove deprecated API for parsing HTML
This commit is contained in:
@@ -42,7 +42,10 @@ pub fn main() !void {
|
||||
defer arena.deinit();
|
||||
|
||||
// document
|
||||
doc = try parser.documentHTMLParseFromFileAlloc(arena.allocator(), "test.html");
|
||||
const file = try std.fs.cwd().openFile("test.html", .{});
|
||||
defer file.close();
|
||||
|
||||
doc = try parser.documentHTMLParseFromFile(file);
|
||||
defer parser.documentHTMLClose(doc) catch |err| {
|
||||
std.debug.print("documentHTMLClose error: {s}\n", .{@errorName(err)});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user