mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57:35 +00:00
LibWeb: Remove DOM element deprecated_get_attribute()
This commit is contained in:
parent
c477f90df7
commit
a681429dff
40 changed files with 114 additions and 122 deletions
|
@ -94,9 +94,9 @@ JS::GCPtr<SVGGradientElement const> SVGGradientElement::linked_gradient() const
|
|||
// FIXME: This entire function is an ad-hoc hack!
|
||||
// It can only resolve #<ids> in the same document.
|
||||
|
||||
auto link = has_attribute(AttributeNames::href) ? deprecated_get_attribute(AttributeNames::href) : deprecated_get_attribute("xlink:href"_fly_string);
|
||||
if (auto href = link; !href.is_empty()) {
|
||||
auto url = document().parse_url(href);
|
||||
auto link = has_attribute(AttributeNames::href) ? get_attribute(AttributeNames::href) : get_attribute("xlink:href"_fly_string);
|
||||
if (auto href = link; href.has_value() && !link->is_empty()) {
|
||||
auto url = document().parse_url(*href);
|
||||
auto id = url.fragment();
|
||||
if (!id.has_value() || id->is_empty())
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue