diff --git a/hijack.go b/hijack.go index a02d4f33..d9a96439 100644 --- a/hijack.go +++ b/hijack.go @@ -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 { @@ -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