mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-16 05:51:55 +00:00
Before, the new title element got appended instead of prepended, as nullptr was passed as the "child" argument to the insert_before() function. This change makes two WPT tests pass in: http://wpt.live/html/dom/documents/dom-tree-accessors/document.title-09.html
12 lines
455 B
HTML
12 lines
455 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
var SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
|
var doc = document.implementation.createDocument(SVG_NAMESPACE, "svg", null);
|
|
var child = doc.createElementNS(SVG_NAMESPACE, "x-child");
|
|
doc.documentElement.appendChild(child);
|
|
doc.title = "foo";
|
|
println(`title == ${doc.documentElement.firstChild.tagName}`);
|
|
});
|
|
</script>
|