1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 13:05:00 +00:00
serenity/Userland/Libraries/LibWeb/HTML/HTMLSlotElement.cpp
Timothy Flynn 7870f10aa8 LibWeb: Introduce the slot concept for HTML slot elements
A slot is an HTMLSlotElement. It may have any number of slottable nodes
assigned to it.
2023-09-13 13:45:47 +02:00

32 lines
795 B
C++

/*
* Copyright (c) 2020, the SerenityOS developers.
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/HTML/HTMLSlotElement.h>
namespace Web::HTML {
HTMLSlotElement::HTMLSlotElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{
}
HTMLSlotElement::~HTMLSlotElement() = default;
void HTMLSlotElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLSlotElementPrototype>(realm, "HTMLSlotElement"));
}
void HTMLSlotElement::visit_edges(JS::Cell::Visitor& visitor)
{
Base::visit_edges(visitor);
Slot::visit_edges(visitor);
}
}