mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Implement range index with the Position enum on ServoUrl
This commit is contained in:
parent
22aebdf5d4
commit
0818b44459
6 changed files with 35 additions and 6 deletions
|
@ -1753,7 +1753,7 @@ impl ScriptThread {
|
|||
// Start with the scheme data of the parsed URL;
|
||||
// append question mark and query component, if any;
|
||||
// append number sign and fragment component if any.
|
||||
let encoded = &incomplete.url.as_url().unwrap()[Position::BeforePath..];
|
||||
let encoded = &incomplete.url[Position::BeforePath..];
|
||||
|
||||
// Percent-decode (8.) and UTF-8 decode (9.)
|
||||
let script_source = percent_decode(encoded.as_bytes()).decode_utf8_lossy();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue