browserscale-ts 1.7.0 → 1.7.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/README.md CHANGED
@@ -78,14 +78,17 @@ Rent an isolated browser session in seconds, automate it with human-like input,
78
78
  offset, with live form state (typed values, checkbox state, `<select>`
79
79
  options) and a node handle to act on. A model reasons over what matters
80
80
  instead of raw HTML, and doesn't need a JS round-trip to ask where it is.
81
- - **Scripts that run inside the browser** — `runScript` sends JavaScript to the
82
- session and runs it in the browser process itself, with a `browser` object
83
- giving it the same operations this SDK exposes — but as local calls rather than
84
- network round trips, so a loop that polls or walks a list costs microseconds
85
- per step instead of tens of milliseconds. The log streams back as the script
86
- produces it. `startScript` leaves a script running without the caller, which is
87
- how work outlives the process that started it, and `followScript` attaches to
88
- one already under way.
81
+ - **Scripts that run beside the browser** — `runScript` sends JavaScript to the
82
+ session, where it runs in an isolate of its own and reaches the document
83
+ through the engine: a cross-origin `<iframe>` is read as plain
84
+ `contentDocument` with no frame ids anywhere, values come back as live objects
85
+ you can assign to rather than snapshots, an element can be handed straight to
86
+ `browser.click`, and the page sees nothing injected. Steps cost microseconds
87
+ rather than network round trips, so loops are affordable. The log streams back
88
+ as the script produces it; `startScript` leaves a script running without the
89
+ caller, which is how work outlives the process that started it, and
90
+ `followScript` attaches to one already under way. A guide for it is still to
91
+ come.
89
92
  - **Sessions you can find again** — `listBrowsers` reports what an API key is
90
93
  paying for: ids, proxy, egress address and remaining rental. A session
91
94
  therefore outlives the process that rented it — recover it after a restart, or
@@ -152,7 +155,7 @@ reports the element that occluded the click.
152
155
  | `browser.click(target, opts?)` | Human-like click; throws a rich `ClickError` on failure. |
153
156
  | `browser.fill(target, text, opts?)` | Per-key typing that fires real input events; `insertText` for bulk commit. |
154
157
  | `browser.evaluate(expr)` | Run JS in the page/frame and get a typed value back. |
155
- | `browser.runScript(source)` | Run JavaScript in the browser process, where every operation is a local call; `startScript` leaves it running, `followScript` watches one already going. |
158
+ | `browser.runScript(source)` | Run JavaScript beside the browser, where cross-origin frames are property access and every step is local; `startScript` leaves it running, `followScript` watches one already going. |
156
159
  | `browser.getObservation(opts?)` | Compact, node-handle-tagged view of the visible page across frames; `opts` tunes budgets and format. |
157
160
  | `browser.captureNetwork(opts, onExchange)` | Stream every request the session completes, optionally with response bodies. |
158
161
  | `browser.mirrorDom(opts, onChange, onResync?)` | Live, incrementally updated copy of the page's DOM across every frame. |
@@ -7229,12 +7229,14 @@ var CloudBrowser = class {
7229
7229
  /**
7230
7230
  * Runs `source` in the session's browser and waits for it to finish.
7231
7231
  *
7232
- * The script executes in a V8 isolate inside the browser process, not in the
7233
- * page, and reaches the same operations this SDK exposes through a `browser`
7234
- * object it is handed. The difference is cost: each call is a function call in
7235
- * the browser rather than a network round trip, so work that is chatty by
7236
- * nature — polling for a selector, walking a list, following pagination —
7237
- * runs in microseconds per step instead of tens of milliseconds.
7232
+ * The script runs beside the browser, in a V8 isolate of its own rather than
7233
+ * in the page, and reaches the document through the engine: a cross-origin
7234
+ * `<iframe>` is read as plain `contentDocument` with no frame ids anywhere,
7235
+ * values come back as live objects it can assign to rather than snapshots, an
7236
+ * element can be handed straight to `browser.click`, and the page sees nothing
7237
+ * injected. Steps cost microseconds rather than network round trips, so work
7238
+ * that is chatty by nature — polling for a selector, walking a list,
7239
+ * following pagination — is affordable there. A guide for it is still to come.
7238
7240
  *
7239
7241
  * This waits for as long as the script runs, and cannot be bounded: the run
7240
7242
  * id needed to cancel only arrives with the reply. Use
package/dist/client.d.ts CHANGED
@@ -1265,12 +1265,14 @@ export declare class CloudBrowser {
1265
1265
  /**
1266
1266
  * Runs `source` in the session's browser and waits for it to finish.
1267
1267
  *
1268
- * The script executes in a V8 isolate inside the browser process, not in the
1269
- * page, and reaches the same operations this SDK exposes through a `browser`
1270
- * object it is handed. The difference is cost: each call is a function call in
1271
- * the browser rather than a network round trip, so work that is chatty by
1272
- * nature — polling for a selector, walking a list, following pagination —
1273
- * runs in microseconds per step instead of tens of milliseconds.
1268
+ * The script runs beside the browser, in a V8 isolate of its own rather than
1269
+ * in the page, and reaches the document through the engine: a cross-origin
1270
+ * `<iframe>` is read as plain `contentDocument` with no frame ids anywhere,
1271
+ * values come back as live objects it can assign to rather than snapshots, an
1272
+ * element can be handed straight to `browser.click`, and the page sees nothing
1273
+ * injected. Steps cost microseconds rather than network round trips, so work
1274
+ * that is chatty by nature — polling for a selector, walking a list,
1275
+ * following pagination — is affordable there. A guide for it is still to come.
1274
1276
  *
1275
1277
  * This waits for as long as the script runs, and cannot be bounded: the run
1276
1278
  * id needed to cancel only arrives with the reply. Use
package/dist/client.js CHANGED
@@ -2003,12 +2003,14 @@ export class CloudBrowser {
2003
2003
  /**
2004
2004
  * Runs `source` in the session's browser and waits for it to finish.
2005
2005
  *
2006
- * The script executes in a V8 isolate inside the browser process, not in the
2007
- * page, and reaches the same operations this SDK exposes through a `browser`
2008
- * object it is handed. The difference is cost: each call is a function call in
2009
- * the browser rather than a network round trip, so work that is chatty by
2010
- * nature — polling for a selector, walking a list, following pagination —
2011
- * runs in microseconds per step instead of tens of milliseconds.
2006
+ * The script runs beside the browser, in a V8 isolate of its own rather than
2007
+ * in the page, and reaches the document through the engine: a cross-origin
2008
+ * `<iframe>` is read as plain `contentDocument` with no frame ids anywhere,
2009
+ * values come back as live objects it can assign to rather than snapshots, an
2010
+ * element can be handed straight to `browser.click`, and the page sees nothing
2011
+ * injected. Steps cost microseconds rather than network round trips, so work
2012
+ * that is chatty by nature — polling for a selector, walking a list,
2013
+ * following pagination — is affordable there. A guide for it is still to come.
2012
2014
  *
2013
2015
  * This waits for as long as the script runs, and cannot be bounded: the run
2014
2016
  * id needed to cancel only arrives with the reply. Use
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browserscale-ts",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "Official SDK for browserscale — undetected stealth browsers in the cloud. Rent real Chromium sessions with unique fingerprints, built-in proxies, captcha solving, human-like input and live video — scale web scraping and automation without running a single browser yourself.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",