From 75658728d07ea72b1198c20b9a4df979b2a53f58 Mon Sep 17 00:00:00 2001 From: ankur22 Date: Fri, 19 Jan 2024 17:16:55 +0000 Subject: [PATCH] Add frame.Timeout for internal parse use This timeout method is to be called from the mapping layer when parsing options. --- common/frame.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/frame.go b/common/frame.go index f0c42a3f3..90bb53557 100644 --- a/common/frame.go +++ b/common/frame.go @@ -1582,6 +1582,12 @@ func (f *Frame) textContent(selector string, opts *FrameTextContentOptions) (str return gv.String(), nil } +// Timeout will return the default timeout or the one set by the user. +// It's an internal method not to be exposed as a JS API. +func (f *Frame) Timeout() time.Duration { + return f.defaultTimeout() +} + // Title returns the title of the frame. func (f *Frame) Title() string { f.log.Debugf("Frame:Title", "fid:%s furl:%q", f.ID(), f.URL())