@browserless/goto 9.3.0-beta.10 → 9.3.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/index.js +7 -6
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@browserless/goto",
|
|
3
3
|
"description": "Go to a page aborting unnecessary requests",
|
|
4
4
|
"homepage": "https://browserless.js.org/#/?id=gotopage-options",
|
|
5
|
-
"version": "9.3.0-beta.
|
|
5
|
+
"version": "9.3.0-beta.11",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"author": {
|
|
8
8
|
"email": "hello@microlink.io",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"timeout": "2m",
|
|
69
69
|
"verbose": true
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "5a93704c7fdb292fdf3a867299b3bfa4b095e701"
|
|
72
72
|
}
|
package/src/index.js
CHANGED
|
@@ -102,9 +102,9 @@ module.exports = ({
|
|
|
102
102
|
const { viewport: defaultViewport } = getDevice.findDevice(defaultDevice)
|
|
103
103
|
|
|
104
104
|
const timeouts = {
|
|
105
|
-
base: (milliseconds = globalTimeout) => milliseconds * (
|
|
106
|
-
action: (milliseconds = globalTimeout) => milliseconds * (1 /
|
|
107
|
-
goto: (milliseconds = globalTimeout) => milliseconds *
|
|
105
|
+
base: (milliseconds = globalTimeout) => milliseconds * (2 / 3),
|
|
106
|
+
action: (milliseconds = globalTimeout) => milliseconds * (1 / 11),
|
|
107
|
+
goto: (milliseconds = globalTimeout) => milliseconds * (7 / 8)
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
// related https://github.com/puppeteer/puppeteer/issues/1353
|
|
@@ -143,7 +143,7 @@ module.exports = ({
|
|
|
143
143
|
scripts,
|
|
144
144
|
scroll,
|
|
145
145
|
styles,
|
|
146
|
-
timeout =
|
|
146
|
+
timeout = globalTimeout,
|
|
147
147
|
timezone,
|
|
148
148
|
url,
|
|
149
149
|
waitForFunction,
|
|
@@ -155,8 +155,9 @@ module.exports = ({
|
|
|
155
155
|
...args
|
|
156
156
|
}
|
|
157
157
|
) => {
|
|
158
|
-
const
|
|
159
|
-
const
|
|
158
|
+
const baseTimeout = timeouts.base(globalTimeout)
|
|
159
|
+
const actionTimeout = timeouts.action(baseTimeout)
|
|
160
|
+
const gotoTimeout = timeouts.goto(baseTimeout)
|
|
160
161
|
|
|
161
162
|
const isWaitUntilAuto = waitUntil === 'auto'
|
|
162
163
|
if (isWaitUntilAuto) waitUntil = 'load'
|