netsurf: remove deprecated API for parsing HTML

This commit is contained in:
Pierre Tachoire
2024-01-08 15:18:17 +01:00
parent 9f77ba01bb
commit 0159051b17
5 changed files with 17 additions and 26 deletions

View File

@@ -17,7 +17,10 @@ pub fn run(arena: *std.heap.ArenaAllocator, comptime apis: []jsruntime.API, comp
const alloc = arena.allocator();
// document
const html_doc = try parser.documentHTMLParseFromFileAlloc(alloc, f);
const file = try std.fs.cwd().openFile(f, .{});
defer file.close();
const html_doc = try parser.documentHTMLParseFromFile(file);
const doc = parser.documentHTMLToDocument(html_doc);
const dirname = fspath.dirname(f[dir.len..]) orelse unreachable;