From cca8a6604aeb93d9ce35dcf0d8e5cd742c7fdcb8 Mon Sep 17 00:00:00 2001 From: John Pham Date: Thu, 24 Feb 2022 15:21:25 -0800 Subject: [PATCH 1/3] Apply https://github.com/rrweb-io/rrweb/pull/844/files --- src/snapshot/utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/snapshot/utils.ts b/src/snapshot/utils.ts index 2b059765..7f848099 100644 --- a/src/snapshot/utils.ts +++ b/src/snapshot/utils.ts @@ -60,7 +60,8 @@ export function is2DCanvasBlank(canvas: HTMLCanvasElement): boolean { // even if we can already tell from the first chunk(s) that // the canvas isn't blank const pixelBuffer = new Uint32Array( - originalGetImageData( + originalGetImageData.call( + ctx, x, y, Math.min(chunkSize, canvas.width - x), From fbb65ec3bcbd0e27fd33094bf527b20517716148 Mon Sep 17 00:00:00 2001 From: John Pham Date: Thu, 24 Feb 2022 15:22:51 -0800 Subject: [PATCH 2/3] Apply https://github.com/rrweb-io/rrweb/pull/843 --- src/snapshot/snapshot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/snapshot/snapshot.ts b/src/snapshot/snapshot.ts index 6e4c544a..fa1bf673 100644 --- a/src/snapshot/snapshot.ts +++ b/src/snapshot/snapshot.ts @@ -207,7 +207,7 @@ export function absoluteToDoc(doc: Document, attributeValue: string): string { } function isSVGElement(el: Element): boolean { - return el.tagName === 'svg' || el instanceof SVGElement; + return Boolean(el.tagName === 'svg' || (el as SVGElement).ownerSVGElement); } function getHref() { From 1886aabf350e992a4281a10fd6c98c8029496a00 Mon Sep 17 00:00:00 2001 From: John Pham Date: Thu, 24 Feb 2022 15:23:58 -0800 Subject: [PATCH 3/3] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3c1621e8..cee02f4d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@highlight-run/rrweb", - "version": "1.1.14", + "version": "1.1.15", "description": "record and replay the web", "scripts": { "test": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register -r ignore-styles -r jsdom-global/register test/**.test.ts",