Skip to content

_instrumentDOM doing the wrong thing #2197

Closed
@pauldraper

Description

@pauldraper

https://github.com/getsentry/sentry-javascript/blob/5.6.1/packages/browser/src/integrations/breadcrumbs.ts#L169

This is calling breadCrumbEventHandler curried function with this which is EventTarget/Node instead of Event. And it's calling it when the event listener is added, instead of when an event is fired.

(IDK why this has been typed as any, but this is what happens when types are ignored.)

It's causing terrible rendering performance because it's debouncing with setTimeout/clearTimeout every single time addEventListener('click', ...) is called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions