mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02:00
LibWeb: Introduce CustomElementRegistry and creating custom elements
The main missing feature here is form associated custom elements.
This commit is contained in:
committed by
Andreas Kling
parent
083b547e97
commit
034aaf3f51
Notes:
sideshowbarker
2024-07-16 23:23:26 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/034aaf3f51 Pull-request: https://github.com/SerenityOS/serenity/pull/18092
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Luke Wilde <lukew@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/HTML/CustomElements/CustomElementReactionNames.h>
|
||||
|
||||
namespace Web::HTML::CustomElementReactionNames {
|
||||
|
||||
#define __ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME(name) FlyString name;
|
||||
ENUMERATE_CUSTOM_ELEMENT_REACTION_NAMES
|
||||
#undef __ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME
|
||||
|
||||
ErrorOr<void> initialize_strings()
|
||||
{
|
||||
static bool s_initialized = false;
|
||||
VERIFY(!s_initialized);
|
||||
|
||||
#define __ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME(name) \
|
||||
name = TRY(#name##_fly_string);
|
||||
ENUMERATE_CUSTOM_ELEMENT_REACTION_NAMES
|
||||
#undef __ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME
|
||||
|
||||
s_initialized = true;
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user