1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:28:12 +00:00

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.
This commit is contained in:
Timothy Flynn 2023-09-05 14:49:30 -04:00 committed by Andreas Kling
parent 45b36bd08a
commit 7870f10aa8
5 changed files with 71 additions and 1 deletions

View file

@ -1,16 +1,20 @@
/*
* Copyright (c) 2020, the SerenityOS developers.
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/DOM/Slot.h>
#include <LibWeb/HTML/HTMLElement.h>
namespace Web::HTML {
class HTMLSlotElement final : public HTMLElement {
class HTMLSlotElement final
: public HTMLElement
, public DOM::Slot {
WEB_PLATFORM_OBJECT(HTMLSlotElement, HTMLElement);
public:
@ -20,6 +24,7 @@ private:
HTMLSlotElement(DOM::Document&, DOM::QualifiedName);
virtual void initialize(JS::Realm&) override;
virtual void visit_edges(JS::Cell::Visitor&) override;
};
}