You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ go list -m github.com/chromedp/chromedpv0.9.1
$ google-chrome --versionVersion 114.0.5735.198 (Official Build) (x86_64)
$ go versiongo version go1.20.1 darwin/amd64
Description:
I'm having trouble with the EventBindingCalled event in the chromedp package. Despite enabling the Runtime domain and adding a binding via JavaScript in the browser, the EventBindingCalled event is not being triggered when I call the bound function. Here's a brief overview of the code I'm using:
switchev:=ev.(type) {
case*runtime.EventBindingCalled:
iferr:=c.WriteJSON(map[string]interface{}{
"session_id": sessionID,
"message": "BINDING_CALLED",
"functionName": ev.Name,
"payload": ev.Payload,
"contextId": ev.ExecutionContextID,
}); err!=nil {
log.Printf("Failed to send bindingCalled event to client: %v", err)
}
default:
log.Printf("Received an event of a different type: %T", ev)
}
What did you expect to see?
I expect the EventBindingCalled event to be triggered when I call the bound function in JavaScript.
What did you see instead?
I'm not receiving the bindingCalled event
to reproduce
Enable the Runtime domain in chromedp.
Add a binding in JavaScript using the Runtime.addBinding or Runtime.setBinding method.
Call the bound function in JavaScript.
Listen for the EventBindingCalled event in chromedp.
The text was updated successfully, but these errors were encountered:
What versions are you running?
Description:
I'm having trouble with the EventBindingCalled event in the chromedp package. Despite enabling the Runtime domain and adding a binding via JavaScript in the browser, the EventBindingCalled event is not being triggered when I call the bound function. Here's a brief overview of the code I'm using:
What did you expect to see?
I expect the EventBindingCalled event to be triggered when I call the bound function in JavaScript.
What did you see instead?
I'm not receiving the bindingCalled event
to reproduce
The text was updated successfully, but these errors were encountered: