ladybird/Libraries/LibWeb/Editing/CommandNames.cpp
Jelle Raaijmakers 7bb865052a LibWeb: Implement document.execCommand("delete")
To facilitate the implementation of "delete" and all associated
algorithms, split off this piece of `Document` into a separate
directory.

This sets up the infrastructure for arbitrary commands to be supported.
2024-11-30 17:35:45 +01:00

29 lines
614 B
C++

/*
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Editing/CommandNames.h>
namespace Web::Editing::CommandNames {
#define __ENUMERATE_COMMAND_NAME(name) FlyString name;
ENUMERATE_COMMAND_NAMES
#undef __ENUMERATE_COMMAND_NAME
FlyString delete_;
void initialize_strings()
{
static bool s_initialized = false;
VERIFY(!s_initialized);
#define __ENUMERATE_COMMAND_NAME(name) name = #name##_fly_string;
ENUMERATE_COMMAND_NAMES
#undef __ENUMERATE_MATHML_TAG
delete_ = "delete"_fly_string;
s_initialized = true;
}
}