Skip to content
This repository was archived by the owner on Jan 21, 2024. It is now read-only.
This repository was archived by the owner on Jan 21, 2024. It is now read-only.

Better window.onerror toggle api (.collectWindowErrors) #21

@devinrhode2

Description

@devinrhode2

In another library I was working on, I figured a very seamless way to offer a boolean toggle is to just have a function that you pass in true/false.

My proposal is changing collectWindowErrors to be a function instead of boolean switch like: TraceKit.collectWindowErrors(false) Then, when you turn off window errors, we also restore the previous window.onerror handler, when you turn them on, we restore our handler.

Any tweaks or good to go?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions