mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:17:35 +00:00
LibWeb: Add the IdleDeadline interface from the RequestIdleCallback spec
This commit is contained in:
parent
64df30230d
commit
11bb6e045f
6 changed files with 83 additions and 1 deletions
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/RequestIdleCallback/IdleDeadline.h>
|
||||
|
||||
namespace Web::RequestIdleCallback {
|
||||
|
||||
NonnullRefPtr<IdleDeadline> IdleDeadline::create(double time_remaining, bool did_timeout)
|
||||
{
|
||||
return adopt_ref(*new IdleDeadline(time_remaining, did_timeout));
|
||||
}
|
||||
|
||||
IdleDeadline::IdleDeadline(double time_remaining, bool did_timeout)
|
||||
: m_time_remaining(time_remaining)
|
||||
, m_did_timeout(did_timeout)
|
||||
{
|
||||
}
|
||||
|
||||
IdleDeadline::~IdleDeadline()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue