1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

LibWeb: Special-case initialization of HTML::AttributeNames::class_

Just do it after all the others instead of trying to be clever.
This commit is contained in:
Andreas Kling 2020-06-03 22:06:21 +02:00
parent 6c09420571
commit 21957745f7

View file

@ -41,18 +41,12 @@ void initialize()
return; return;
#define __ENUMERATE_HTML_ATTRIBUTE(name) \ #define __ENUMERATE_HTML_ATTRIBUTE(name) \
name = #name; \ name = #name;
if (name.ends_with("_")) \
name = name.view().substring_view(0, name.length() - 1);
ENUMERATE_HTML_ATTRIBUTES ENUMERATE_HTML_ATTRIBUTES
#undef __ENUMERATE_HTML_ATTRIBUTE #undef __ENUMERATE_HTML_ATTRIBUTE
id = "id"; // NOTE: Special case for the class attribute since it's a C++ keyword.
class_ = "class"; class_ = "class";
type = "type";
href = "href";
style = "style";
name = "name";
s_initialized = true; s_initialized = true;
} }