From 742c7adb088ee5e83462205d3238d2539ddfc699 Mon Sep 17 00:00:00 2001 From: Matt Mc <4984708+tooolbox@users.noreply.github.com> Date: Thu, 24 Mar 2022 21:42:14 -0700 Subject: [PATCH] Make the doc for Timeout more clear (#567) --- context.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/context.go b/context.go index 9e10434d..ff069761 100644 --- a/context.go +++ b/context.go @@ -25,7 +25,7 @@ func (b *Browser) GetContext() context.Context { return b.ctx } -// Timeout returns a clone with the specified timeout context.Context chained sub-operations +// Timeout returns a clone with the specified total timeout of all chained sub-operations func (b *Browser) Timeout(d time.Duration) *Browser { ctx, cancel := context.WithTimeout(b.ctx, d) return b.Context(context.WithValue(ctx, timeoutContextKey{}, &timeoutContextVal{b.ctx, cancel})) @@ -63,7 +63,7 @@ func (p *Page) GetContext() context.Context { return p.ctx } -// Timeout returns a clone with the specified timeout context.Context chained sub-operations +// Timeout returns a clone with the specified total timeout of all chained sub-operations func (p *Page) Timeout(d time.Duration) *Page { ctx, cancel := context.WithTimeout(p.ctx, d) return p.Context(context.WithValue(ctx, timeoutContextKey{}, &timeoutContextVal{p.ctx, cancel})) @@ -101,7 +101,7 @@ func (el *Element) GetContext() context.Context { return el.ctx } -// Timeout returns a clone with the specified timeout context.Context chained sub-operations +// Timeout returns a clone with the specified total timeout of all chained sub-operations func (el *Element) Timeout(d time.Duration) *Element { ctx, cancel := context.WithTimeout(el.ctx, d) return el.Context(context.WithValue(ctx, timeoutContextKey{}, &timeoutContextVal{el.ctx, cancel}))