LibWeb/SVG: Process script element when href attribute changes

This commit is contained in:
Tim Ledbetter 2025-02-26 12:48:57 +00:00 committed by Jelle Raaijmakers
parent a187d5f28f
commit f4c4d3c780
Notes: github-actions[bot] 2025-02-26 15:09:53 +00:00
2 changed files with 9 additions and 0 deletions

View file

@ -35,6 +35,14 @@ void SVGScriptElement::visit_edges(Cell::Visitor& visitor)
visitor.visit(m_script);
}
void SVGScriptElement::attribute_changed(FlyString const& name, Optional<String> const& old_value, Optional<String> const& value, Optional<FlyString> const& namespace_)
{
Base::attribute_changed(name, old_value, value, namespace_);
if (name == SVG::AttributeNames::href) {
process_the_script_element();
}
}
void SVGScriptElement::inserted()
{
Base::inserted();