You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- **Long Animation Frames (LoAF)** — browser reports frames taking longer than 50 ms with richer script attribution (Chrome 123+, Edge 123+).
249
+
All issues are enabled by default. If user browser does not support some metric, it won't be sent.
257
250
258
-
Both freeze detectors are enabled by default. If one API is unsupported, the other still works.
259
-
Each detected freeze is reported immediately with detailed context (duration, blocking time, scripts involved, etc.).
260
-
`thresholdMs` is an additional Hawk filter on top of browser reporting. Hawk emits an issue when measured duration is equal to or greater than this value. Values below `50ms` are clamped to `50ms`.
261
251
262
252
### Web Vitals
263
253
@@ -268,7 +258,8 @@ Each Web Vitals issue context contains metric fields:
268
258
- `rating`
269
259
- `delta`
270
260
271
-
`web-vitals` is optional and used only when `issues.webVitals:true`:
261
+
**You need to install the `web-vitals` package if you enable `webVitals=true` (by default).**
262
+
272
263
- NPM/ESM setup: install `web-vitals` as dependency.
273
264
- CDN setup: expose global `window.webVitals` before Hawk initialization.
274
265
@@ -305,15 +296,6 @@ const hawk = new HawkCatcher({
305
296
});
306
297
```
307
298
308
-
### Options
309
-
310
-
| Option | Type | Default | Description |
311
-
|--------|------|---------|-------------|
312
-
| `errors` | `boolean` | `true` | Enable global errors handling (`window.onerror` and `unhandledrejection`). |
313
-
| `webVitals` | `boolean` | `true` | Listen to Core Web Vitals and send one issue event per metric when that metric is rated `poor`. Requires optional `web-vitals` dependency. |
314
-
| `longTasks` | `boolean` or `{ thresholdMs?: number }` | `true` | `false` disables. `true` enables with default threshold. Object enables and uses `thresholdMs` when valid; otherwise fallback threshold `70ms` is used (minimum effective value `50ms`). |
315
-
| `longAnimationFrames` | `boolean` or `{ thresholdMs?: number }` | `true` | `false` disables. `true` enables with default threshold. Object enables and uses `thresholdMs` when valid; otherwise fallback threshold `200ms` is used (minimum effective value `50ms`). Requires Chrome 123+ / Edge 123+. |
316
-
317
299
## Source maps consuming
318
300
319
301
If your bundle is minified, it is useful to pass source-map files to the Hawk. After that you will see beautiful
0 commit comments