mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-16 14:02:00 +00: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:
parent
8d6f2390f6
commit
ff3d3840ac
Notes:
github-actions[bot]
2025-06-24 17:56:55 +00:00
Author: https://github.com/tcl3
Commit: ff3d3840ac
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5201
Reviewed-by: https://github.com/gmta ✅
12 changed files with 106 additions and 98 deletions
|
@ -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] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue