From 6afa874714b86df3045109d0e06b51aed694debd Mon Sep 17 00:00:00 2001 From: Kenneth Shaw Date: Mon, 18 Dec 2017 11:03:22 +0700 Subject: [PATCH] Add empty *page.EventLifecycleEvent handler Fixes #154 --- handler.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/handler.go b/handler.go index db2b7e8..fa14eec 100644 --- a/handler.go +++ b/handler.go @@ -534,12 +534,15 @@ func (h *TargetHandler) pageEvent(ctxt context.Context, ev interface{}) { case *page.EventFrameClearedScheduledNavigation: id, op = e.FrameID, frameClearedScheduledNavigation + // ignored events case *page.EventDomContentEventFired: return case *page.EventLoadEventFired: return case *page.EventFrameResized: return + case *page.EventLifecycleEvent: + return default: h.errorf("unhandled page event %s", reflect.TypeOf(ev))