dom: fix processing instruction clone

This commit is contained in:
Pierre Tachoire
2024-04-05 16:33:58 +02:00
parent d58045c330
commit 49e3d569de
4 changed files with 52 additions and 9 deletions

View File

@@ -342,12 +342,14 @@ pub fn testExecFn(
var createComment = [_]Case{
.{ .src = "var v = document.createComment('foo')", .ex = "undefined" },
.{ .src = "v.nodeName", .ex = "#comment" },
.{ .src = "let v2 = v.cloneNode()", .ex = "undefined" },
};
try checkCases(js_env, &createComment);
var createProcessingInstruction = [_]Case{
.{ .src = "let pi = document.createProcessingInstruction('foo', 'bar')", .ex = "undefined" },
.{ .src = "pi.target", .ex = "foo" },
.{ .src = "let pi2 = pi.cloneNode()", .ex = "undefined" },
};
try checkCases(js_env, &createProcessingInstruction);