mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Implement Document.rootElement (SVG2 extension to Document)
This commit is contained in:
parent
e6f75801b1
commit
879cba762b
Notes:
github-actions[bot]
2025-05-16 18:37:14 +00:00
Author: https://github.com/awesomekling
Commit: 879cba762b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4775
4 changed files with 16 additions and 3 deletions
|
@ -151,6 +151,7 @@
|
|||
#include <LibWeb/ResizeObserver/ResizeObserverEntry.h>
|
||||
#include <LibWeb/SVG/SVGDecodedImageData.h>
|
||||
#include <LibWeb/SVG/SVGElement.h>
|
||||
#include <LibWeb/SVG/SVGSVGElement.h>
|
||||
#include <LibWeb/SVG/SVGStyleElement.h>
|
||||
#include <LibWeb/SVG/SVGTitleElement.h>
|
||||
#include <LibWeb/Selection/Selection.h>
|
||||
|
@ -892,6 +893,12 @@ Element const* Document::document_element() const
|
|||
return first_child_of_type<Element>();
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/SVG2/struct.html#InterfaceDocumentExtensions
|
||||
GC::Ptr<SVG::SVGSVGElement> Document::root_element()
|
||||
{
|
||||
return as_if<SVG::SVGSVGElement>(document_element());
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/dom.html#the-html-element-2
|
||||
HTML::HTMLHtmlElement* Document::html_element()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue