Skip to content

set LocalStorage error #36

Description

@colinsarah

set localstorage before navigate url get error : DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document

chromedp.Run(*tab.Ctx,
		RunWithTimeOut(tab.Ctx, tab.config.DomContentLoadedTimeout, chromedp.Tasks{
			dom.Enable(),
			page.Enable(),
			runtime.Enable(),
			network.Enable(),
			fetch.Enable().WithHandleAuthRequests(true),
			network.SetExtraHTTPHeaders(tab.ExtraHeaders),
			setLocalStorage(LocalStorage),
			chromedp.Navigate(tab.NavigateReq.URL.String()),
		}),

thanks for any help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions