mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
LibWeb: Don't prepare script when src attribute is removed
This commit is contained in:
committed by
Jelle Raaijmakers
parent
63b451cb46
commit
08b5cae199
@@ -64,6 +64,11 @@ void HTMLScriptElement::attribute_changed(FlyString const& name, Optional<String
|
||||
if (namespace_.has_value())
|
||||
return;
|
||||
|
||||
// AD-HOC: This ensures that prepare_script() is not called when the src attribute is removed.
|
||||
// See: https://github.com/whatwg/html/pull/10188/files#r1685905457 for more information.
|
||||
if (!value.has_value())
|
||||
return;
|
||||
|
||||
// 2. If localName is src, then run the script HTML element post-connection steps, given element.
|
||||
post_connection();
|
||||
} else if (name == HTML::AttributeNames::async) {
|
||||
|
||||
Reference in New Issue
Block a user