about summary refs log tree commit diff stats
path: root/src/types
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-01-24 12:33:05 +0100
committerbptato <nincsnevem662@gmail.com>2024-01-24 12:33:05 +0100
commitfe2d01b8d6d569bf8855979ab0e83ae03b62eb73 (patch)
tree54cc010bd0883333878581bdf609c93d79edb8f1 /src/types
parent2ff8f87f82cf971160eeced2ded6189d19e72162 (diff)
downloadchawan-fe2d01b8d6d569bf8855979ab0e83ae03b62eb73.tar.gz
js: allow specifying static function name, small refactoring
* static function names can now be defined using the syntax
  `Class:functionName' (or just use `Class' to take the default name
* fix URL.canParse with 1 argument only
* do not store JSFuncGenerator for constructors; just put the function
  node in BoundFunctions
Diffstat (limited to 'src/types')
-rw-r--r--src/types/url.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/types/url.nim b/src/types/url.nim
index f2957807..180c41d1 100644
--- a/src/types/url.nim
+++ b/src/types/url.nim
@@ -1255,7 +1255,7 @@ proc setHash*(url: URL, s: string) {.jsfset: "hash".} =
   url.fragment = some("")
   discard basicParseURL(s, url = url, stateOverride = some(FRAGMENT_STATE))
 
-proc canParse(url: string, base: Option[string]): bool {.jsstfunc: "URL".} =
+proc canParse(url: string, base = none(string)): bool {.jsstfunc: "URL".} =
   return parseAPIURL(url, base).isSome
 
 proc addURLModule*(ctx: JSContext) =