mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 22:55:23 +00:00
LibWeb: Use correct integer parsing rules in HTMLLIElement::value()
This commit is contained in:
committed by
Andreas Kling
parent
67d05b0104
commit
a61883ae88
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <LibWeb/ARIA/Roles.h>
|
||||
#include <LibWeb/HTML/HTMLElement.h>
|
||||
#include <LibWeb/WebIDL/Types.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
@@ -21,8 +22,8 @@ public:
|
||||
// https://www.w3.org/TR/html-aria/#el-li
|
||||
virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::listitem; }
|
||||
|
||||
i32 value() { return get_attribute(AttributeNames::value).value_or("0"_string).to_number<i32>().value_or(0); }
|
||||
void set_value(i32 value)
|
||||
WebIDL::Long value();
|
||||
void set_value(WebIDL::Long value)
|
||||
{
|
||||
set_attribute(AttributeNames::value, String::number(value)).release_value_but_fixme_should_propagate_errors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user