1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +00:00

LibWeb: Fix various spec comment inconsistencies

- Don't add multiple numbers to nested steps, just the innermost one
  (as rendered in the HTML document)
- "Otherwise" comments go before the else, not after it
- "FIXME:" goes before step number, not between it and the comment text
- Always add a period between number and comment text

The majority of these were introduced in #13756, but some unrelated ones
have been updated as well.
This commit is contained in:
Linus Groh 2022-04-20 19:48:48 +02:00
parent bf16061142
commit 95541d7064
7 changed files with 133 additions and 131 deletions

View file

@ -34,15 +34,15 @@ DOM::ExceptionOr<void> WorkerGlobalScope::import_scripts(Vector<String> urls)
// which if provided will be used when invoking fetch a classic worker-imported script.
// NOTE: Service Workers is an example of a specification that runs this algorithm with its own options for the perform the fetch hook.
// 1. FIXME: If worker global scope's type is "module", throw a TypeError exception.
// 2. FIXME: Let settings object be the current settings object.
// FIXME: 1. If worker global scope's type is "module", throw a TypeError exception.
// FIXME: 2. Let settings object be the current settings object.
// 3. If urls is empty, return.
if (urls.is_empty())
return {};
// 4. FIXME: Parse each value in urls relative to settings object. If any fail, throw a "SyntaxError" DOMException.
// 5. FIXME: For each url in the resulting URL records, run these substeps:
// FIXME: 4. Parse each value in urls relative to settings object. If any fail, throw a "SyntaxError" DOMException.
// FIXME: 5. For each url in the resulting URL records, run these substeps:
// 1. Fetch a classic worker-imported script given url and settings object, passing along any custom perform the fetch steps provided.
// If this succeeds, let script be the result. Otherwise, rethrow the exception.
// 2. Run the classic script script, with the rethrow errors argument set to true.