2021-09-26 01:03:42 +02:00
|
|
|
/*
|
2024-10-04 13:19:50 +02:00
|
|
|
* Copyright (c) 2021, Andreas Kling <andreas@ladybird.org>
|
2021-09-26 01:03:42 +02:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <LibWeb/DOM/Document.h>
|
|
|
|
#include <LibWeb/DOM/DocumentLoadEventDelayer.h>
|
|
|
|
|
|
|
|
namespace Web::DOM {
|
|
|
|
|
|
|
|
DocumentLoadEventDelayer::DocumentLoadEventDelayer(Document& document)
|
2024-11-15 04:01:23 +13:00
|
|
|
: m_document(GC::make_root(document))
|
2021-09-26 01:03:42 +02:00
|
|
|
{
|
|
|
|
m_document->increment_number_of_things_delaying_the_load_event({});
|
|
|
|
}
|
|
|
|
|
|
|
|
DocumentLoadEventDelayer::~DocumentLoadEventDelayer()
|
|
|
|
{
|
|
|
|
m_document->decrement_number_of_things_delaying_the_load_event({});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|