changed browser api to return pages that can be acted on, not strictly contents
This commit is contained in:
18
cookiejar.go
18
cookiejar.go
@@ -18,3 +18,21 @@ type CookieJar interface {
|
||||
Set(cookie Cookie) error
|
||||
Delete(cookie Cookie) error
|
||||
}
|
||||
|
||||
// ReadOnlyCookieJar is a wrapper for CookieJar that allows only read operations on cookies, but all
|
||||
// write operations are no-ops.
|
||||
type ReadOnlyCookieJar struct {
|
||||
Jar CookieJar
|
||||
}
|
||||
|
||||
func (r ReadOnlyCookieJar) GetAll() ([]Cookie, error) {
|
||||
return r.Jar.GetAll()
|
||||
}
|
||||
|
||||
func (r ReadOnlyCookieJar) Set(_ Cookie) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r ReadOnlyCookieJar) Delete(_ Cookie) error {
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user