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

add ignore element option #1

Closed
Yuyz0112 opened this issue Oct 24, 2018 · 2 comments
Closed

add ignore element option #1

Yuyz0112 opened this issue Oct 24, 2018 · 2 comments
Labels
good first issue Good for newcomers

Comments

@Yuyz0112
Copy link
Member

Yuyz0112 commented Oct 24, 2018

If some elements were in the ignore list, stop observe and record its value.
We also need a default to ignore list, including some elements like password input and so on.

@Yuyz0112
Copy link
Member Author

Yuyz0112 commented Nov 12, 2018

  1. Form element
  • password type input should not be recorded
  • customize ignore form element should not be recorded
  1. DOM
  • customize ignore element and its children nodes should not be recorded

We may have two approaches to customize ignore element.

One is to ignore certain class name/data attribute, such as .rr-ignore, and users could add this class name to the element they do not want to record.

Another one is to add an ignore class name option like ['.a', '#b', '[data-c="true"]'], which was already used in users' apps.

The first one needs users to update their source code when the second one may cause extra complexity and potential performance issue.

Personally, I tend to implement the first one because most apps do not already have some markups for privacy usage. And if we provided the second solution, users may define a class name like .ignore which also need to update the source code.

Any feedback is welcomed.

@Yuyz0112 Yuyz0112 added the good first issue Good for newcomers label Nov 12, 2018
@Yuyz0112
Copy link
Member Author

Yuyz0112 commented Dec 2, 2018

  1. An element with the class name .rr-block will not be recorded. Instead, it will replay as a placeholder with the same dimension.
  2. An element with the class name .rr-ignore will not record the input events.
  3. input[type="password"] will be ignored as default.

Juice10 referenced this issue in Juice10/rrweb Sep 17, 2020
IMFIL added a commit to IMFIL/rrweb that referenced this issue Oct 15, 2021
merge rrweb master into our fork
Juice10 added a commit that referenced this issue Feb 9, 2023
Releases via GitHub Actions
lewgordon-amplitude pushed a commit to lewgordon-amplitude/rrweb that referenced this issue Aug 1, 2024
…ument

perf: only call createHTMLDocument when it is needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant