1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:38:11 +00:00

LibWeb: Bring Node closer to spec

Node::base_uri() correct implementation was left as a FIXME.
This commit is contained in:
Igor Pissolati 2022-04-12 13:20:13 -03:00 committed by Andreas Kling
parent e2fa5c0cda
commit 682a4a347a
3 changed files with 11 additions and 0 deletions

View file

@ -78,6 +78,13 @@ Node::~Node()
deallocate_node_id(m_id);
}
// https://dom.spec.whatwg.org/#dom-node-baseuri
String Node::base_uri() const
{
// FIXME: Return thiss node documents document base URL, serialized.
return document().url_string();
}
const HTML::HTMLAnchorElement* Node::enclosing_link_element() const
{
for (auto* node = this; node; node = node->parent()) {