mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 09:18:52 +00:00
LibWeb: Return DOMException instead of crashing when setting attributes
This commit is contained in:
parent
6891676fce
commit
5d3b7a5ecc
Notes:
sideshowbarker
2024-07-16 19:42:24 +09:00
Author: https://github.com/PrestonLTaylor
Commit: 5d3b7a5ecc
Pull-request: https://github.com/SerenityOS/serenity/pull/19044
24 changed files with 57 additions and 51 deletions
|
@ -64,9 +64,9 @@ unsigned int HTMLTableCellElement::col_span() const
|
|||
return attribute(HTML::AttributeNames::colspan).to_uint().value_or(1);
|
||||
}
|
||||
|
||||
void HTMLTableCellElement::set_col_span(unsigned int value)
|
||||
WebIDL::ExceptionOr<void> HTMLTableCellElement::set_col_span(unsigned int value)
|
||||
{
|
||||
MUST(set_attribute(HTML::AttributeNames::colspan, DeprecatedString::number(value)));
|
||||
return set_attribute(HTML::AttributeNames::colspan, DeprecatedString::number(value));
|
||||
}
|
||||
|
||||
unsigned int HTMLTableCellElement::row_span() const
|
||||
|
@ -74,9 +74,9 @@ unsigned int HTMLTableCellElement::row_span() const
|
|||
return attribute(HTML::AttributeNames::rowspan).to_uint().value_or(1);
|
||||
}
|
||||
|
||||
void HTMLTableCellElement::set_row_span(unsigned int value)
|
||||
WebIDL::ExceptionOr<void> HTMLTableCellElement::set_row_span(unsigned int value)
|
||||
{
|
||||
MUST(set_attribute(HTML::AttributeNames::rowspan, DeprecatedString::number(value)));
|
||||
return set_attribute(HTML::AttributeNames::rowspan, DeprecatedString::number(value));
|
||||
}
|
||||
|
||||
Optional<ARIA::Role> HTMLTableCellElement::default_role() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue