summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM/DocumentLoadEventDelayer.cpp
blob: 60043ea00c080af1ba4603bfd1528821bfc8156e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/DocumentLoadEventDelayer.h>

namespace Web::DOM {

DocumentLoadEventDelayer::DocumentLoadEventDelayer(Document& document)
    : m_document(document)
{
    m_document->increment_number_of_things_delaying_the_load_event({});
}

DocumentLoadEventDelayer::~DocumentLoadEventDelayer()
{
    m_document->decrement_number_of_things_delaying_the_load_event({});
}

}