mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +00:00
LibWeb: Make Element attribute getters take a StringView
These functions are deferring to NamedNodeMap::get_attribute which already takes a StringView. This changes also leads to finding some places which were passing though a const char* instead of an entry from Attribute names. Fix that where applicable, and switch to has_attribute in some of those places instead of deprecated_attribute where equivalent. Ideally this should be taking a 'FlyString const&', but to continue porting away from DeprecatedString, just leave a FIXME for now.
This commit is contained in:
parent
dbf8ff64fb
commit
47514e07b4
6 changed files with 64 additions and 63 deletions
|
@ -25,7 +25,7 @@ public:
|
|||
virtual DeprecatedString aria_level() const override
|
||||
{
|
||||
// TODO: aria-level = the number in the element's tag name
|
||||
return get_attribute("aria-level");
|
||||
return get_attribute("aria-level"sv);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue