When I run this simple code in console :
performance.mark('start-mark');
performance.mark('stop-mark');
performance.measure('name','start-mark','stop-mark');
performance.measure returns PerformanceMeasure object (as in documentation https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure). The problem is that everything works fine in chrome, edge and safari. Unfortunately in firefox it reutrns undefined.
Beside documentation I checked also in caniuse.com and it should work.
Can you help me to run this "code" in firefox (version 93 - actual).
This appears to be a known implementation inconsistency in Firefox.
From https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure#browser_compatibility):
I worked around this using Performance.getEntriesByName:
performance.mark('start-mark');
performance.mark('stop-mark');
performance.measure('name', 'start-mark', 'stop-mark');
console.log(performance.getEntriesByName('name', 'measure')[0]);