-
Notifications
You must be signed in to change notification settings - Fork 17
chrome.Browser.Socket.Page.Enable
Michael Kenney edited this page Sep 29, 2018
·
1 revision
Enable page events for a tab. This is important as until they are explicitly enabled none of the Page
events will be delivered to the devtools websocket. This is also true of various other functionality in Chrome. See the documentation for details.
package main
import (
chrome "github.com/mkenney/go-chrome/tot"
)
func main() {
var err error
// ... snip ... //
// Enable Page events for this tab
if enableResult := <-tab.Page().Enable(); nil != enableResult.Err {
panic(enableResult.Err.Error())
}
}
"When the eagle flies, does it forget that its feet have touched the ground? When the tiger lands upon its prey, does it forget its moment in the air? Three pounds of VAX!"