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
Notes: sideshowbarker 2024-07-19 05:51:32 +09:00

View file

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