Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: ShadowHost can't be a string #941

Closed
1 task done
pavlogavryliuk opened this issue Jul 20, 2022 · 0 comments · Fixed by #1020
Closed
1 task done

[Bug]: ShadowHost can't be a string #941

pavlogavryliuk opened this issue Jul 20, 2022 · 0 comments · Fixed by #1020
Assignees
Labels
bug Something isn't working has PR already has pull request for it

Comments

@pavlogavryliuk
Copy link

pavlogavryliuk commented Jul 20, 2022

Preflight Checklist

  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.

What package is this bug report for?

rrweb

Expected Behavior

Some HTML Element getRootNode().host method returns a String type, but RRWeb expected type is Element or null.

image

Actual Behavior

How to reproduce?

  1. Bitbucket -> Recent repositories -> Go to any repository
  2. Same behavior on CNN pages

What's happening?

It's mutation.ts file:

const shadowHost = n.getRootNode().host returns a String type, but expected type is Element or null:

image

this.doc.contains(shadowHost) - if shadowHost is a String type, this line is crashing rrweb recording:

image

Testcase Gist URL

No response

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working has PR already has pull request for it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants