diff options
author | bptato <nincsnevem662@gmail.com> | 2022-11-15 23:42:20 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-11-19 14:32:54 +0100 |
commit | a6bbcd0dd3f77b0e98527c1fa9e510a40acd954e (patch) | |
tree | ca55cc9079afbe788a61986e42d1a8d9d0bc7c2f /src/types | |
parent | e75f62b34f7c7f3127bcde0c4a12cbb785342dd9 (diff) | |
download | chawan-a6bbcd0dd3f77b0e98527c1fa9e510a40acd954e.tar.gz |
Rewrite buffer/pager for multi-processing
Diffstat (limited to 'src/types')
-rw-r--r-- | src/types/url.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/types/url.nim b/src/types/url.nim index 8d274b57..fc9e20e8 100644 --- a/src/types/url.nim +++ b/src/types/url.nim @@ -947,6 +947,14 @@ proc set*(params: URLSearchParams, name: string, value: string) {.jsfunc.} = first = false params.list[i][1] = value +proc newURL*(url: URL): URL = + new(result) + result[] = url[] + if url.searchParams != nil: #TODO ideally this should never be false + result.searchParams = URLSearchParams() + result.searchParams[] = url.searchParams[] + result.searchParams.url = some(result) + #TODO add Option wrapper proc newURL*(s: string, base: Option[string] = none(string)): URL {.jserr, jsctor.} = if base.issome: |