Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions hijack.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ func newHijackRouter(browser *Browser, client proto.Client) *HijackRouter {
}
}

// Client returns the underlying client instance.
func (r *HijackRouter) Client() proto.Client {
return r.client
}

func (r *HijackRouter) initEvents() *HijackRouter { //nolint: gocognit
ctx := r.browser.ctx
if cta, ok := r.client.(proto.Contextable); ok {
Expand Down Expand Up @@ -255,6 +260,11 @@ type HijackRequest struct {
req *http.Request
}

// Event returns the underlying event instance.
func (ctx *HijackRequest) Event() *proto.FetchRequestPaused {
return ctx.event
}

// Type of the resource.
func (ctx *HijackRequest) Type() proto.NetworkResourceType {
return ctx.event.ResourceType
Expand Down