Release 0.9.6

This commit is contained in:
Yanzhen Yu
2020-09-21 14:01:56 +08:00
parent f8e88ced7b
commit 8065415de6
4 changed files with 5 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "rrweb", "name": "rrweb",
"version": "0.9.5", "version": "0.9.6",
"description": "record and replay the web", "description": "record and replay the web",
"scripts": { "scripts": {
"test": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register test/**/*.test.ts", "test": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register test/**/*.test.ts",

View File

@@ -330,7 +330,7 @@ export class Replayer {
this.iframe.contentDocument, this.iframe.contentDocument,
); );
polyfill(this.iframe.contentWindow); polyfill(this.iframe.contentWindow as Window & typeof globalThis);
} }
} }
@@ -894,7 +894,7 @@ export class Replayer {
parentInDocument = this.iframe.contentDocument.contains(parent); parentInDocument = this.iframe.contentDocument.contains(parent);
} else if (this.iframe.contentDocument.body.contains) { } else if (this.iframe.contentDocument.body.contains) {
// fix for IE // fix for IE
// refer 'Internet Explorer notes' at https://developer.mozilla.org/zh-CN/docs/Web/API/Document // refer 'Internet Explorer notes' at https://developer.mozilla.org/zh-CN/docs/Web/API/Document
parentInDocument = this.iframe.contentDocument.body.contains(parent); parentInDocument = this.iframe.contentDocument.body.contains(parent);
} }

View File

@@ -314,7 +314,7 @@ export class TreeIndex {
const node = mirror.getNode(id); const node = mirror.getNode(id);
node?.childNodes.forEach((childNode) => { node?.childNodes.forEach((childNode) => {
if ('__sn' in childNode) { if ('__sn' in childNode) {
deepRemoveFromMirror(((childNode as unknown) as INode).__sn.id) deepRemoveFromMirror(((childNode as unknown) as INode).__sn.id);
} }
}); });
}; };

2
typings/utils.d.ts vendored
View File

@@ -12,7 +12,7 @@ export declare function getWindowWidth(): number;
export declare function isBlocked(node: Node | null, blockClass: blockClass): boolean; export declare function isBlocked(node: Node | null, blockClass: blockClass): boolean;
export declare function isAncestorRemoved(target: INode): boolean; export declare function isAncestorRemoved(target: INode): boolean;
export declare function isTouchEvent(event: MouseEvent | TouchEvent): event is TouchEvent; export declare function isTouchEvent(event: MouseEvent | TouchEvent): event is TouchEvent;
export declare function polyfill(): void; export declare function polyfill(win?: Window & typeof globalThis): void;
export declare function needCastInSyncMode(event: eventWithTime): boolean; export declare function needCastInSyncMode(event: eventWithTime): boolean;
export declare type TreeNode = { export declare type TreeNode = {
id: number; id: number;