LibWeb: Make base URL of HTML::Script Optional

This is a null or a URL in the spec, which we were previously
representing through the invalid state of URL.
This commit is contained in:
Shannon Booth 2025-02-16 15:53:04 +13:00 committed by Tim Flynn
commit 705001483a
Notes: github-actions[bot] 2025-02-19 13:02:39 +00:00
5 changed files with 9 additions and 9 deletions

View file

@ -329,7 +329,7 @@ i32 WindowOrWorkerGlobalScopeMixin::run_timer_initialization_steps(TimerHandler
// options's credentials mode, referrer policy is initiating script's fetch options's referrer policy, and fetch priority is "auto".
// 2. Set base URL to initiating script's base URL.
base_url = initiating_script->base_url();
base_url = initiating_script->base_url().value();
// Spec Note: The effect of these steps ensures that the string compilation done by setTimeout() and setInterval() behaves equivalently to that
// done by eval(). That is, module script fetches via import() will behave the same in both contexts.