choojs / choojs/choo

choo should clear performance timers

Open
#461 1 comment 0 reactions 0 assignees View on GitHub
breaking Type: Enhancement
Dominant language
JavaScript
Stars
6.8k
Forks
573
PR merge metrics
No merged PRs in 30d

Description

right now we're relying on `choo-log` but actually `choo` should be responsible. If `choo-log` is not used the buffer can fill up which throws an error (after 200 or so events). Given it's an assignment it can easily be overwritten so making it part of `{ timings: true }` makes sense I think.

### code
```js
var hasPerformance = typeof window !== 'undefined' &&
window.performance &&
window.performance.onresroucetimingbufferfull
if (hasPerformance) {
window.performance.onresourcetimingbufferfull = function () {
window.performance.clearResourceTimings()
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.