AK+LibWeb: Add a UTF-16 starts/ends with wrapper for a single code unit

This commit is contained in:
Timothy Flynn 2025-08-06 07:43:11 -04:00 committed by Jelle Raaijmakers
commit 1bc80848fb
Notes: github-actions[bot] 2025-08-07 00:07:32 +00:00
8 changed files with 26 additions and 9 deletions

View file

@ -163,7 +163,7 @@ WebIDL::ExceptionOr<ModuleSpecifierMap> sort_and_normalise_module_specifier_map(
}
// 6. If specifierKey ends with U+002F (/), and the serialization of addressURL does not end with U+002F (/), then:
if (specifier_key.as_string().view().ends_with("/"sv) && !address_url->serialize().ends_with('/')) {
if (specifier_key.as_string().view().ends_with('/') && !address_url->serialize().ends_with('/')) {
// 1. The user agent may report a warning to the console indicating that an invalid address was given for the specifier key specifierKey; since specifierKey ends with a slash, the address needs to as well.
auto& console = realm.intrinsics().console_object()->console();
console.output_debug_message(JS::Console::LogLevel::Warn,