This is the test case. According to browser implementation, DOM should satisfy it but deno-dom doesn't.
Interestingly, other elements like <p>, <div>, etc work as expected.
Deno.test(
"setting th to Element.innerHTML keeps the shape of the child",
() => {
const doc = new DOMParser().parseFromString(
`<table><tr id=parent></tr></table>`,
"text/html"
)!;
const parent = doc.querySelector("#parent")!;
parent.innerHTML = "<th>This is a header</th>";
// `innerHTML === "This is a header"` somehow 🤔
assertEquals(
parent.innerHTML,
"<th>table header</th>",
"innerHTML keeps the shape of the child"
);
}
);
I'm not familiar with Rust so it's difficult for me to fix it 🙇
This is the test case. According to browser implementation, DOM should satisfy it but deno-dom doesn't.
Interestingly, other elements like
<p>
,<div>
, etc work as expected.I'm not familiar with Rust so it's difficult for me to fix it 🙇