mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +00:00
LibWeb: Add method to get last added task to an EventLoop
This commit is contained in:
committed by
Andreas Kling
parent
995df8f565
commit
a53486a073
@@ -71,4 +71,11 @@ ErrorOr<Vector<NonnullOwnPtr<Task>>> TaskQueue::take_tasks_matching(Function<boo
|
||||
return matching_tasks;
|
||||
}
|
||||
|
||||
Task const* TaskQueue::last_added_task() const
|
||||
{
|
||||
if (m_tasks.is_empty())
|
||||
return nullptr;
|
||||
return m_tasks.last();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user