netsurf: first adaptations

Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
This commit is contained in:
Francis Bouvier
2023-09-20 23:04:16 +02:00
parent 75e1b97cd6
commit 766b7b4ed8
9 changed files with 28 additions and 41 deletions

View File

@@ -3,12 +3,10 @@ const std = @import("std");
const jsruntime = @import("jsruntime");
const generate = @import("generate.zig");
const parser = @import("parser.zig");
const parser = @import("netsurf.zig");
const DOM = @import("dom.zig");
const testExecFn = @import("html/document.zig").testExecFn;
const html_test = @import("html_test.zig").html;
var doc: *parser.DocumentHTML = undefined;
fn testsExecFn(
@@ -38,9 +36,8 @@ test {
const apis = jsruntime.compile(DOM.Interfaces);
// document
doc = parser.documentHTMLInit();
defer parser.documentHTMLDeinit(doc);
try parser.documentHTMLParse(doc, html_test);
var f = "test.html".*;
doc = parser.documentHTMLParse(&f);
// create JS vm
const vm = jsruntime.VM.init();