mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 21:25:07 +00:00
LibWeb: Run object representation steps on specified attribute updates
This commit is contained in:
parent
83cb35b60f
commit
1c2e7b1e47
2 changed files with 15 additions and 1 deletions
|
@ -36,8 +36,21 @@ void HTMLObjectElement::parse_attribute(FlyString const& name, DeprecatedString
|
|||
{
|
||||
BrowsingContextContainer::parse_attribute(name, value);
|
||||
|
||||
if (name == HTML::AttributeNames::data)
|
||||
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element
|
||||
// Whenever one of the following conditions occur:
|
||||
if (
|
||||
// - the element's classid attribute is set, changed, or removed,
|
||||
(name == HTML::AttributeNames::classid) ||
|
||||
// - the element's classid attribute is not present, and its data attribute is set, changed, or removed,
|
||||
(!has_attribute(HTML::AttributeNames::classid) && name == HTML::AttributeNames::data) ||
|
||||
// - neither the element's classid attribute nor its data attribute are present, and its type attribute is set, changed, or removed,
|
||||
(!has_attribute(HTML::AttributeNames::classid) && !has_attribute(HTML::AttributeNames::data) && name == HTML::AttributeNames::type)) {
|
||||
|
||||
// ...the user agent must queue an element task on the DOM manipulation task source given
|
||||
// the object element to run the following steps to (re)determine what the object element represents.
|
||||
// This task being queued or actively running must delay the load event of the element's node document.
|
||||
queue_element_task_to_run_object_representation_steps();
|
||||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-object-data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue