mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Correctly initialize URL.searchParams
This commit is contained in:
parent
7932ab6ac2
commit
85de5ec743
3 changed files with 25 additions and 28 deletions
|
@ -42,6 +42,10 @@ impl URL {
|
|||
global, URLBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn query_pairs(&self) -> Vec<(String, String)> {
|
||||
self.url.borrow().query_pairs().into_owned().collect()
|
||||
}
|
||||
|
||||
pub fn set_query_pairs(&self, pairs: &[(String, String)]) {
|
||||
let mut url = self.url.borrow_mut();
|
||||
url.query_pairs_mut().clear().extend_pairs(pairs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue