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

rrweb: replace onerror with addEventListener('error',handler) in the rrweb console plugin #761

Merged
merged 1 commit into from
Nov 30, 2021

Conversation

YunFeng0817
Copy link
Member

@YunFeng0817 YunFeng0817 commented Nov 30, 2021

  1. The main reason for changing the API:
    window.onerror can be easily overwritten by other code, such as a JavaScript Framework, or even another JS error reporting tool.
    reference
  2. The main browser compatibility concern: error event isn't supported by IE11, but IE11 supports the mutation observer API.
    reference:
    caniuse error event
    caniuse mutation observer

@userback PTAL

@lee-userback
Copy link

Nice

@Yuyz0112
Copy link
Member

LGTM

@Yuyz0112 Yuyz0112 merged commit f756790 into master Nov 30, 2021
@YunFeng0817 YunFeng0817 deleted the console-plugin branch November 30, 2021 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants