Skip to content

Commit

Permalink
fixup! [HIG] add Highlight features for rrweb
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadman97 committed Mar 5, 2024
1 parent 11a7526 commit 0d5cd39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/rrdom/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export function buildFromDom(
// if the parentRRNode isn't a RRIFrameElement
parentRRNode?.nodeName !== 'IFRAME' &&
// if node isn't a shadow root
node.nodeType !== NodeType.DOCUMENT_FRAGMENT_NODE
(node.nodeType as NodeType) !== NodeType.DOCUMENT_FRAGMENT_NODE
) {
parentRRNode?.appendChild(rrNode);
rrNode.parentNode = parentRRNode;
Expand All @@ -316,13 +316,13 @@ export function buildFromDom(
const iframeDoc = (node as HTMLIFrameElement).contentDocument;
iframeDoc && walk(iframeDoc, rrNode);
} else if (
node.nodeType === NodeType.DOCUMENT_NODE ||
node.nodeType === NodeType.ELEMENT_NODE ||
node.nodeType === NodeType.DOCUMENT_FRAGMENT_NODE
(node.nodeType as NodeType) === NodeType.DOCUMENT_NODE ||
(node.nodeType as NodeType) === NodeType.ELEMENT_NODE ||
(node.nodeType as NodeType) === NodeType.DOCUMENT_FRAGMENT_NODE
) {
// if the node is a shadow dom
if (
node.nodeType === NodeType.ELEMENT_NODE &&
(node.nodeType as NodeType) === NodeType.ELEMENT_NODE &&
(node as HTMLElement).shadowRoot
)
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
Expand Down
2 changes: 2 additions & 0 deletions packages/rrweb-player/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-node-resolve": "^13.2.1",
"@rrweb/types": "workspace:*",
"@types/eslint": "^8",
"@types/offscreencanvas": "^2019.6.4",
"eslint": "^8.57.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-svelte3": "^4.0.0",
"postcss-easy-import": "^3.0.0",
Expand Down

0 comments on commit 0d5cd39

Please sign in to comment.