vendor/github.com/go-rod/rod/lib/js/js.go
21 lines · 518 bytes
1package js
2
3// Function definition.
4type Function struct {
5 // Name must be unique and not conflict with the function names in "helper.js"
6 Name string
7
8 // Definition holds the code of a js function from "helper.js",
9 // the js code is compressed by uglify-js.
10 Definition string
11
12 // Dependencies will be preloaded and assigned to the global js object "functions"
13 Dependencies []*Function
14}
15
16// Functions ...
17var Functions = &Function{
18 Name: "functions",
19 Definition: "() => ({})",
20 Dependencies: nil,
21}