forked from zserge/lorca
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbrowser.go
More file actions
24 lines (21 loc) · 740 Bytes
/
Copy pathbrowser.go
File metadata and controls
24 lines (21 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package lorca
import "encoding/json"
// browserImpl is the internal interface each browser backend implements.
// ui holds a browserImpl and delegates all browser interactions through it.
type browserImpl interface {
eval(expr string) (json.RawMessage, error)
load(url string) error
bounds() (Bounds, error)
setBounds(Bounds) error
injectScript(js string) error // registers script for all future docs + runs on current page
injectBinding(name string) error // like injectScript but avoids cross-realm calls for Firefox
setBlockBackNavigation(enable bool)
setAppUserModelID(id string)
kill()
done() <-chan struct{}
}
// Compile-time interface checks.
var (
_ browserImpl = (*chrome)(nil)
_ browserImpl = (*firefox)(nil)
)