1
0
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:
Tim Voronov
2018-10-04 21:37:28 -04:00
parent 71ee1f3dfe
commit c650d28b29
7 changed files with 55 additions and 27 deletions

View File

@ -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)