mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 07:39:16 +00:00
LibWeb: Add a DOM::Element::set_attribute override for UTF-16 strings
This just transcodes to UTF-8 for now, but primarily serves to to keep compatibility with generated IDL definitions.
This commit is contained in:
parent
9d993143de
commit
e7b08cf291
Notes:
github-actions[bot]
2025-07-28 10:26:37 +00:00
Author: https://github.com/trflynn89
Commit: e7b08cf291
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5610
6 changed files with 14 additions and 7 deletions
|
@ -529,7 +529,7 @@ WebIDL::ExceptionOr<void> Page::toggle_media_loop_state()
|
|||
if (media_element->has_attribute(HTML::AttributeNames::loop))
|
||||
media_element->remove_attribute(HTML::AttributeNames::loop);
|
||||
else
|
||||
TRY(media_element->set_attribute(HTML::AttributeNames::loop, {}));
|
||||
TRY(media_element->set_attribute(HTML::AttributeNames::loop, String {}));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
@ -545,7 +545,7 @@ WebIDL::ExceptionOr<void> Page::toggle_media_controls_state()
|
|||
if (media_element->has_attribute(HTML::AttributeNames::controls))
|
||||
media_element->remove_attribute(HTML::AttributeNames::controls);
|
||||
else
|
||||
TRY(media_element->set_attribute(HTML::AttributeNames::controls, {}));
|
||||
TRY(media_element->set_attribute(HTML::AttributeNames::controls, String {}));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue