Zizzamia / perfume.js

Web performance library for measuring all performance vitals metrics
https://zizzamia.github.io/perfume/
MIT License
3.13k stars 112 forks source link

required member entryTypes is undefined #197

Closed ZengTianShengZ closed 2 years ago

ZengTianShengZ commented 2 years ago

Perfume.js: TypeError: Failed to executr 'observe' on 'PerformanceObserver' : required member entryTypes is undefined

https://github.com/Zizzamia/perfume.js/blob/4f0c7300ccd4cdda9e2afe31d11000718a664799/src/performanceObserver.ts#L18

perfObserver.observe({ type: eventType, buffered: true });  // will throw error at chrome 70
// but
perfObserver.observe({ eventTypes: eventType });  // can work

environment

os: win10
chrome: chrome_win64_stable_70.0.3538.102
Zizzamia commented 2 years ago

Alright, now Perfume.js is a super set of Web Vitals, starting from v8.0.0. Which will help have better parity of latest edge cases discovered.

Please, if you see anything that is not working let me know and I will take care of it.

Zizzamia commented 2 years ago

Also happy to re-open the issue if you see the latest version does not fix your issue.