summaryrefslogtreecommitdiff
path: root/js.go
diff options
context:
space:
mode:
Diffstat (limited to 'js.go')
-rw-r--r--js.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/js.go b/js.go
index 7b5630b..5170800 100644
--- a/js.go
+++ b/js.go
@@ -55,6 +55,12 @@ func (e Exports) Scrape(p ScrapeParams) (any, error) {
return fn(p)
}
+func (e Exports) Login() {
+ if fn, ok := e["login"].(func(goja.FunctionCall) goja.Value); ok {
+ fn(goja.FunctionCall{})
+ }
+}
+
type Imports map[string]map[string]any
func Compile(src string, imports Imports) (Exports, error) {