LibWeb: Update fetch single module script steps

This updates the steps for fetching single module scripts and related
functions.
This commit is contained in:
Glenn Skrzypczak
2025-09-02 15:31:23 +02:00
committed by Shannon Booth
parent 2e0a7f54d9
commit 8053c2a0f1
Notes: github-actions[bot] 2026-04-03 19:22:39 +00:00
2 changed files with 58 additions and 47 deletions

View File

@@ -330,8 +330,8 @@ bool is_scripting_disabled(JS::Realm const& realm)
// https://whatpr.org/html/9893/webappapis.html#module-type-allowed
bool module_type_allowed(JS::Realm const&, StringView module_type)
{
// 1. If moduleType is not "javascript", "css", or "json", then return false.
if (module_type != "javascript"sv && module_type != "css"sv && module_type != "json"sv)
// 1. If moduleType is not "javascript-or-wasm", "css", or "json", then return false.
if (module_type != "javascript-or-wasm"sv && module_type != "css"sv && module_type != "json"sv)
return false;
// FIXME: 2. If moduleType is "css" and the CSSStyleSheet interface is not exposed in realm, then return false.