LibWeb: Use full source URL as script filename

Just the basename is not enough in most cases, as it's usually not
immediately obvious where scripts are loaded from.
This commit is contained in:
Linus Groh 2021-04-25 19:28:25 +02:00
parent 71d27abb97
commit c2f936b14c

View file

@ -207,7 +207,7 @@ void HTMLScriptElement::prepare_script()
auto request = LoadRequest::create_for_url_on_page(url, document().page());
// FIXME: This load should be made asynchronous and the parser should spin an event loop etc.
m_script_filename = url.basename();
m_script_filename = url.to_string();
ResourceLoader::the().load_sync(
request,
[this, url](auto data, auto&, auto) {