chromedp / chromedp

A faster, simpler way to drive browsers supporting the Chrome DevTools Protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why can't I listen to my iframe's network requests

CrazyXi opened this issue · comments

Why can't I listen to my iframe's network requests

func listenForNetworkEvent(ctx context.Context) {
	chromedp.ListenTarget(ctx, func(ev interface{}) {
		switch ev := ev.(type) {
		case *network.EventResponseReceived:
			fmt.Println(ev.Response.URL)
		}
	})
}