mirror of
https://github.com/MontFerret/ferret.git
synced 2025-06-19 00:18:00 +02:00
Added support to open blank page
This commit is contained in:
@ -38,6 +38,10 @@ func (drv *Driver) GetDocument(ctx context.Context, url string) (values.HtmlNode
|
||||
ctx, cancel := context.WithTimeout(ctx, DefaultTimeout)
|
||||
defer cancel()
|
||||
|
||||
if url == "" {
|
||||
url = BlankPageUrl
|
||||
}
|
||||
|
||||
// Create a new target belonging to the browser context, similar
|
||||
// to opening a new tab in an incognito window.
|
||||
createTargetArgs := target.NewCreateTargetArgs(url).SetBrowserContextID(drv.contextID)
|
||||
|
Reference in New Issue
Block a user