mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Insert title as first child on setting title of svg document
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
This commit is contained in:
parent
910f9c2c09
commit
3ff6137121
Notes:
github-actions[bot]
2024-10-14 05:14:48 +00:00
Author: https://github.com/ronak69
Commit: 3ff6137121
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1773
3 changed files with 14 additions and 1 deletions
|
@ -923,7 +923,7 @@ WebIDL::ExceptionOr<void> Document::set_title(String const& title)
|
|||
element = TRY(DOM::create_element(*this, HTML::TagNames::title, Namespace::SVG));
|
||||
|
||||
// 2. Insert element as the first child of the document element.
|
||||
document_element->insert_before(*element, nullptr);
|
||||
document_element->insert_before(*element, document_element->first_child());
|
||||
}
|
||||
|
||||
// 3. String replace all with the given value within element.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue