mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Remove XML-derived attribute name validation from DOMStringMap
Corresponds to 841fcfdb2c
This commit is contained in:
parent
1e30fd5c6a
commit
b7b504cf2d
Notes:
github-actions[bot]
2025-07-17 11:55:16 +00:00
Author: https://github.com/AtkinsSJ
Commit: b7b504cf2d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5482
Reviewed-by: https://github.com/gmta ✅
2 changed files with 4 additions and 1 deletions
|
@ -162,7 +162,9 @@ WebIDL::ExceptionOr<void> DOMStringMap::set_value_of_new_named_property(String c
|
|||
|
||||
auto data_name = MUST(builder.to_string());
|
||||
|
||||
// FIXME: 4. If name does not match the XML Name production, throw an "InvalidCharacterError" DOMException.
|
||||
// 4. If name is not a valid attribute local name, then throw an "InvalidCharacterError" DOMException.
|
||||
if (!DOM::is_valid_attribute_local_name(data_name))
|
||||
return WebIDL::InvalidCharacterError::create(realm(), "Name is not a valid attribute local name."_string);
|
||||
|
||||
// 5. Set an attribute value for the DOMStringMap's associated element using name and value.
|
||||
TRY(m_associated_element->set_attribute(data_name, value));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue