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:
parent
6c09420571
commit
21957745f7
1 changed files with 2 additions and 8 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue