mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:48:12 +00:00
LibWeb: Introduce CustomElementRegistry and creating custom elements
The main missing feature here is form associated custom elements.
This commit is contained in:
parent
083b547e97
commit
034aaf3f51
38 changed files with 1747 additions and 143 deletions
|
@ -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 {};
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue