mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb/SVG: Process script element when href attribute changes
This commit is contained in:
parent
a187d5f28f
commit
f4c4d3c780
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ public:
|
|||
|
||||
virtual void inserted() override;
|
||||
virtual void children_changed(ChildrenChangedMetadata const*) override;
|
||||
virtual void attribute_changed(FlyString const& name, Optional<String> const& old_value, Optional<String> const& value, Optional<FlyString> const& namespace_) override;
|
||||
|
||||
protected:
|
||||
SVGScriptElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user