Missing types for page error events.
See original GitHub issueHi, I can’t see the type definition of the page errors. For example:
page, _ := browserContext.NewPage()
page.Once("pageerror", func(err ???) {
c.Logger().Errorf("an error on the page was detected: %s", err)
})
I also recommend using custom function types e.g
type RequestFailedEventHandler = func(request *Request)
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Missing types for page error events. · Issue #65 - GitHub
Hi, I can't see the type definition of the page errors. For example: page, _ := browserContext.NewPage() page.Once("pageerror", func(err ?
Read more >Missing Error Handling | OWASP Foundation
Missing Error Handling. Description. A web application must define a default error page for 404 errors, 500 errors, and to catch java.
Read more >How to troubleshoot Meta Pixel error and warning messages ...
Error and warning messages you may see for the Meta Pixel in Events Manager · Missing event name: This error appears when your...
Read more >TS error: Type 'event' is missing the following properties from ...
It's OK. The issue was eventName: string, TS sees that you are allowing to listen for any event (keyboard or not) so it...
Read more >an error about missing fields - WordPress.org
hello, i just got an error in my google search console about missing fields thats related to events “matches”. Missing field “eventAttendanceMode” its...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Cool, thanks for confirming. Some events like that or others are missing, try to come up with them over the next week.
Yeah I didn’t do much Go for a while and thought its fine to solve it like that. I wanted to keep the API pretty much the same as we have upstream so it corresponds with Python, Java or C#. If you have concrete improvements, I would be happy if you want to collaborate with me on the codebase, waitForEvent/newExpectWrapper is definitely something which is improvable. 👍
This issue was only about page error events. Your example would fix it. 👍
In general, I think the driver overuse reflection and empty interface. In many cases, we could develop against concrete types.
I like this approach https://mionskowski.pl/generic-event-dispatcher-in-go to handle events from different types.