LibWeb: Fix Request() TypeError message typo for mode='navigate'

The Request constructor’s mode validation threw
  "Mode must not be 'navigate"
missing the closing quote. Add the trailing quote so the error reads:
  "Mode must not be 'navigate'".
This commit is contained in:
Pavel Shliak 2025-09-14 21:40:28 +04:00 committed by Sam Atkins
commit bbb9159883
Notes: github-actions[bot] 2025-09-15 07:20:42 +00:00

View file

@ -333,7 +333,7 @@ WebIDL::ExceptionOr<GC::Ref<Request>> Request::construct_impl(JS::Realm& realm,
// 17. If mode is "navigate", then throw a TypeError.
if (mode == Infrastructure::Request::Mode::Navigate)
return WebIDL::SimpleException { WebIDL::SimpleExceptionType::TypeError, "Mode must not be 'navigate"sv };
return WebIDL::SimpleException { WebIDL::SimpleExceptionType::TypeError, "Mode must not be 'navigate'"sv };
// 18. If mode is non-null, set requests mode to mode.
if (mode.has_value())