summaryrefslogtreecommitdiff
path: root/js.go
diff options
context:
space:
mode:
authorPhilipp Tanlak <philipp.tanlak@gmail.com>2023-11-01 21:20:40 +0100
committerPhilipp Tanlak <philipp.tanlak@gmail.com>2023-11-01 21:20:40 +0100
commitaadd80b3b213988aa5701075f2650198e4066349 (patch)
tree23d61848106682a0c72338c07c37d6b9f87a1b47 /js.go
parent2d3cd6584dedce45ea709d1757a28ce7537f3472 (diff)
Add login functionality
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) {