mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:37:35 +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
|
@ -1345,7 +1345,7 @@ Messages::WebDriverClient::ElementClickResponse WebDriverConnection::element_cli
|
|||
|
||||
// 3. If element’s container has the multiple attribute, toggle the element’s selectedness state
|
||||
// by setting it to the opposite value of its current selectedness.
|
||||
if (parent_node.has_value() && parent_node->has_attribute("multiple")) {
|
||||
if (parent_node.has_value() && parent_node->has_attribute(Web::HTML::AttributeNames::multiple)) {
|
||||
option_element.set_selected(!option_element.selected());
|
||||
}
|
||||
// Otherwise, set the element’s selectedness state to true.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue