diff --git a/src/browser/dom/implementation.zig b/src/browser/dom/implementation.zig index b9cbb592..55d302a1 100644 --- a/src/browser/dom/implementation.zig +++ b/src/browser/dom/implementation.zig @@ -61,7 +61,10 @@ test "Browser.DOM.Implementation" { try runner.testCases(&.{ .{ "let impl = document.implementation", "undefined" }, .{ "impl.createHTMLDocument();", "[object HTMLDocument]" }, - .{ "impl.createHTMLDocument('foo');", "[object HTMLDocument]" }, + .{ "const doc = impl.createHTMLDocument('foo');", "undefined" }, + .{ "doc", "[object HTMLDocument]" }, + .{ "doc.title", "foo" }, + .{ "doc.body", "[object HTMLBodyElement]" }, .{ "impl.createDocument(null, 'foo');", "[object Document]" }, .{ "impl.createDocumentType('foo', 'bar', 'baz')", "[object DocumentType]" }, .{ "impl.hasFeature()", "true" }, diff --git a/src/browser/netsurf.zig b/src/browser/netsurf.zig index edf02e6a..895167f8 100644 --- a/src/browser/netsurf.zig +++ b/src/browser/netsurf.zig @@ -1920,7 +1920,6 @@ pub inline fn domImplementationCreateHTMLDocument(title: ?[]const u8) !*Document _ = try nodeAppendChild(elementToNode(html), elementToNode(head)); if (title) |t| { - try documentHTMLSetTitle(doc_html, t); const htitle = try documentCreateElement(doc, "title"); const txt = try documentCreateTextNode(doc, t); _ = try nodeAppendChild(elementToNode(htitle), @as(*Node, @ptrCast(txt)));