@devskin/browser-sdk 1.0.22 → 1.0.23
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/collectors/screenshot.d.ts.map +1 -1
- package/dist/devskin.cjs.js +9 -2
- package/dist/devskin.cjs.js.map +1 -1
- package/dist/devskin.esm.js +9 -2
- package/dist/devskin.esm.js.map +1 -1
- package/dist/devskin.umd.js +9 -2
- package/dist/devskin.umd.js.map +1 -1
- package/dist/devskin.umd.min.js +1 -1
- package/dist/devskin.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/devskin.umd.js
CHANGED
|
@@ -8935,13 +8935,20 @@
|
|
|
8935
8935
|
if (this.config.debug) {
|
|
8936
8936
|
console.log('[DevSkin] Capturing page screenshot...');
|
|
8937
8937
|
}
|
|
8938
|
+
// Get full page dimensions
|
|
8939
|
+
const fullWidth = Math.max(document.body.scrollWidth, document.documentElement.scrollWidth, document.body.offsetWidth, document.documentElement.offsetWidth, document.body.clientWidth, document.documentElement.clientWidth);
|
|
8940
|
+
const fullHeight = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight);
|
|
8938
8941
|
const canvas = yield html2canvas(document.body, {
|
|
8939
8942
|
allowTaint: true,
|
|
8940
8943
|
useCORS: true,
|
|
8941
8944
|
logging: false,
|
|
8942
8945
|
scale: 0.5, // Reduce size
|
|
8943
|
-
width:
|
|
8944
|
-
height:
|
|
8946
|
+
width: fullWidth,
|
|
8947
|
+
height: fullHeight, // Capture ENTIRE page
|
|
8948
|
+
windowWidth: fullWidth,
|
|
8949
|
+
windowHeight: fullHeight,
|
|
8950
|
+
x: 0,
|
|
8951
|
+
y: 0,
|
|
8945
8952
|
});
|
|
8946
8953
|
// Convert to base64 JPEG (smaller than PNG)
|
|
8947
8954
|
const screenshot = canvas.toDataURL('image/jpeg', 0.6);
|