mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +00:00
LibWeb/HTML: Add cloning steps for HTMLScriptElement
This commit is contained in:
committed by
Tim Ledbetter
parent
2e96ba11e4
commit
3dbaae5cfc
@@ -650,4 +650,16 @@ void HTMLScriptElement::set_async(bool async)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/scripting.html#script-processing-model:concept-node-clone-ext
|
||||||
|
WebIDL::ExceptionOr<void> HTMLScriptElement::cloned(Node& copy, bool subtree)
|
||||||
|
{
|
||||||
|
TRY(Base::cloned(copy, subtree));
|
||||||
|
|
||||||
|
// The cloning steps for script elements given node, copy, and subtree are to set copy's already started to node's already started.
|
||||||
|
auto& script_copy = verify_cast<HTMLScriptElement>(copy);
|
||||||
|
script_copy.m_already_started = m_already_started;
|
||||||
|
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ public:
|
|||||||
[[nodiscard]] bool async() const;
|
[[nodiscard]] bool async() const;
|
||||||
void set_async(bool);
|
void set_async(bool);
|
||||||
|
|
||||||
|
virtual WebIDL::ExceptionOr<void> cloned(Node&, bool) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
HTMLScriptElement(DOM::Document&, DOM::QualifiedName);
|
HTMLScriptElement(DOM::Document&, DOM::QualifiedName);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user