@phpsandbox/sdk 0.0.43 → 0.0.45
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/dist/beacon/index.d.ts +5 -1
- package/dist/beacon/index.d.ts.map +1 -1
- package/dist/beacon/index.js +8 -0
- package/dist/beacon/index.js.map +1 -1
- package/dist/beacon/types.d.ts +62 -0
- package/dist/beacon/types.d.ts.map +1 -1
- package/dist/browser/phpsandbox-sdk.esm.js +8 -0
- package/dist/browser/phpsandbox-sdk.esm.js.map +2 -2
- package/dist/browser/phpsandbox-sdk.esm.min.js +2 -2
- package/dist/browser/phpsandbox-sdk.esm.min.js.map +3 -3
- package/dist/browser/phpsandbox-sdk.iife.js +8 -0
- package/dist/browser/phpsandbox-sdk.iife.js.map +2 -2
- package/dist/browser/phpsandbox-sdk.iife.min.js +2 -2
- package/dist/browser/phpsandbox-sdk.iife.min.js.map +3 -3
- package/package.json +1 -1
|
@@ -4983,6 +4983,14 @@ var PHPSandbox = (() => {
|
|
|
4983
4983
|
async fetch(request) {
|
|
4984
4984
|
return this.sendAndWaitFor("fetch", "fetchResult", request);
|
|
4985
4985
|
}
|
|
4986
|
+
/**
|
|
4987
|
+
* Capture the current beacon document, optionally clipped to a viewport or document rectangle.
|
|
4988
|
+
*/
|
|
4989
|
+
async captureScreenshot(request = {}) {
|
|
4990
|
+
const mediaTimeoutMs = request.mediaTimeoutMs ?? request.timeout ?? 3e4;
|
|
4991
|
+
const timeoutMs = request.transportTimeoutMs ?? mediaTimeoutMs + 5e3;
|
|
4992
|
+
return this.sendAndWaitFor("captureScreenshot", "screenshotResult", request, timeoutMs);
|
|
4993
|
+
}
|
|
4986
4994
|
/**
|
|
4987
4995
|
* Debug a page (navigate and capture debug information). It loads
|
|
4988
4996
|
* the page fresh in the IFRAME so that we can capture the latest state.
|