mirror of
https://github.com/MontFerret/ferret.git
synced 2025-07-05 00:49:00 +02:00
Bugfix/#399 navigation (#432)
* Refactored networking * Some work * Added event loop * Renamed EventHandler to Handler * wip * Removed console logs * Added DOMManager * Refactored frame managment * Fixes * Fixed concurrency issues * Fixed unit tests * Improved EventLoop api * Some fixes * Refactored event loop. * Improved logic of initial page load * Cleaned up * Fixed linting issues * Fixed dom.Manager.Close * SOme works * Fixes * Removed fmt.Println statements * Refactored WaitForNavigation * Removed filter for e2e tests * Made Cookies Measurable * Made Cookies KeyedCollection * Fixes after code review * Updated e2e tests for iframes * Fixed iframe lookup in e2e tests * Added comments
This commit is contained in:
@ -24,7 +24,7 @@ func CookieSet(ctx context.Context, args ...core.Value) (core.Value, error) {
|
||||
return values.None, err
|
||||
}
|
||||
|
||||
cookies := make([]drivers.HTTPCookie, 0, len(args)-1)
|
||||
cookies := make(drivers.HTTPCookies)
|
||||
|
||||
for _, c := range args[1:] {
|
||||
cookie, err := parseCookie(c)
|
||||
@ -33,8 +33,8 @@ func CookieSet(ctx context.Context, args ...core.Value) (core.Value, error) {
|
||||
return values.None, err
|
||||
}
|
||||
|
||||
cookies = append(cookies, cookie)
|
||||
cookies[cookie.Name] = cookie
|
||||
}
|
||||
|
||||
return values.None, page.SetCookies(ctx, cookies...)
|
||||
return values.None, page.SetCookies(ctx, cookies)
|
||||
}
|
||||
|
Reference in New Issue
Block a user