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

@@ -37,7 +37,10 @@ fn testExecFn(
try js_env.attachObject(try js_env.getGlobal(), "window", null);
// document
doc = try parser.documentHTMLParseFromFileAlloc(std.testing.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)});
};