@ai-ecoverse/slicc-browsers 1.40.0 → 1.40.1
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/cookie-plant.mjs +10 -2
- package/guard-vectors.json +1 -1
- package/package.json +1 -1
package/cookie-plant.mjs
CHANGED
|
@@ -271,8 +271,10 @@ async function openPage(reader, url, notes, internalSessions, browserContextId =
|
|
|
271
271
|
);
|
|
272
272
|
if (!created.ok) return created;
|
|
273
273
|
internalSessions.add(created.result.sessionId);
|
|
274
|
-
const seen = { href: '', held: false };
|
|
274
|
+
const seen = { href: '', held: false, first: null, last: null };
|
|
275
275
|
const ready = await waitFor(async () => {
|
|
276
|
+
seen.last = Date.now();
|
|
277
|
+
seen.first ??= seen.last;
|
|
276
278
|
const read = await outcome(
|
|
277
279
|
reader.send(
|
|
278
280
|
'Runtime.evaluate',
|
|
@@ -293,7 +295,13 @@ async function openPage(reader, url, notes, internalSessions, browserContextId =
|
|
|
293
295
|
targetId: created.result.targetId,
|
|
294
296
|
url,
|
|
295
297
|
ready: Boolean(ready),
|
|
296
|
-
...(seen.held
|
|
298
|
+
...(seen.held
|
|
299
|
+
? {
|
|
300
|
+
href: seen.href.slice(0, 200),
|
|
301
|
+
requested: sameUrl(seen.href, url),
|
|
302
|
+
waitedMs: seen.last - seen.first,
|
|
303
|
+
}
|
|
304
|
+
: {}),
|
|
297
305
|
});
|
|
298
306
|
if (!ready)
|
|
299
307
|
return {
|
package/guard-vectors.json
CHANGED