1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:57:43 +00:00

LibWeb: Add DOM::Element::queue_an_element_task(source, steps)

This roughly models the "queue an element task" algorithm from the spec.
For safety, this captures a strong reference to the element, and then
bundles that with a callback into a HTML::Task (that we then queue up.)
This commit is contained in:
Andreas Kling 2021-09-09 00:59:09 +02:00
parent 909e522cf7
commit aa3ba629ba
2 changed files with 13 additions and 0 deletions

View file

@ -15,6 +15,7 @@
#include <LibWeb/DOM/NonDocumentTypeChildNode.h>
#include <LibWeb/DOM/ParentNode.h>
#include <LibWeb/HTML/AttributeNames.h>
#include <LibWeb/HTML/EventLoop/Task.h>
#include <LibWeb/HTML/TagNames.h>
#include <LibWeb/Layout/Node.h>
#include <LibWeb/QualifiedName.h>
@ -104,6 +105,8 @@ public:
m_custom_properties.set(custom_property_name, style_property);
}
void queue_an_element_task(HTML::Task::Source, Function<void()>);
protected:
RefPtr<Layout::Node> create_layout_node() override;