Skip to content

Commit a6d2ed9

Browse files
YunFeng0817nafees87nJuice10
authored andcommitted
Feat: Add support for replaying :defined pseudo-class of custom elements (rrweb-io#1155)
* Feat: Add support for replaying :defined pseudo-class of custom elements * add isCustom flag to serialized elements Applying Justin's review suggestion * fix code lint error * add custom element event * fix: tests (rrweb-io#1348) * Update packages/rrweb/src/record/observer.ts * Update packages/rrweb/src/record/observer.ts --------- Co-authored-by: Nafees Nehar <[email protected]> Co-authored-by: Justin Halsall <[email protected]>
1 parent 48102cf commit a6d2ed9

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

packages/rrweb/src/record/iframe-manager.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ export class IframeManager implements IframeManagerInterface {
271271
}
272272
}
273273
}
274-
275274
return false;
276275
}
277276

packages/rrweb/src/record/observer.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,12 +1242,8 @@ function initCustomElementObserver({
12421242
customElementCb,
12431243
}: observerParam): listenerHandler {
12441244
const win = doc.defaultView as IWindow;
1245-
if (!win || !win.customElements) {
1246-
return () => {
1247-
// do nothing
1248-
};
1249-
}
1250-
1245+
// eslint-disable-next-line @typescript-eslint/no-empty-function
1246+
if (!win || !win.customElements) return () => {};
12511247
const restoreHandler = patch(
12521248
win.customElements,
12531249
'define',

0 commit comments

Comments
 (0)