mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 19:47:17 +02:00
LibWeb: Replace usages of Document::parse_url()
The spec has been updated to use `encoding_parse_url()` and `encoding_parse_and_serialize_url()` instead.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
8d6f2390f6
commit
ff3d3840ac
Notes:
github-actions[bot]
2025-06-24 17:56:55 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/ff3d3840ac9 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5201 Reviewed-by: https://github.com/gmta ✅
@@ -387,10 +387,10 @@ void HTMLScriptElement::prepare_script()
|
||||
// 4. Set el's from an external file to true.
|
||||
m_from_an_external_file = true;
|
||||
|
||||
// 5. Parse src relative to el's node document.
|
||||
auto url = document().parse_url(src);
|
||||
// 5. Let url be the result of encoding-parsing a URL given src, relative to el's node document.
|
||||
auto url = document().encoding_parse_url(src);
|
||||
|
||||
// 6. If the previous step failed, then queue an element task on the DOM manipulation task source given el to fire an event named error at el, and return. Otherwise, let url be the resulting URL record.
|
||||
// 6. If url is failure, then queue an element task on the DOM manipulation task source given el to fire an event named error at el, and return.
|
||||
if (!url.has_value()) {
|
||||
dbgln("HTMLScriptElement: Refusing to run script because the src URL '{}' is invalid.", url);
|
||||
queue_an_element_task(HTML::Task::Source::DOMManipulation, [this] {
|
||||
|
||||
Reference in New Issue
Block a user