A PerformanceTimeline polyfill for legacy browsers.
module
npm install --save timing2
import timing2 from 'timing2';
timing2.getEntries();
timing2.getEntriesByName(name);
timing2.getEntriesByType('navigation');
timing2.now();
timing2.timeOrigin;
standalone
<script src="https://unpkg.com/[email protected]/lib/timing2.js"></script>
<script>
timing2.getEntries();
timing2.getEntriesByName(name);
timing2.getEntriesByType('navigation');
timing2.now();
timing2.timeOrigin;
</script>
The following methods and properties of window.performance
is polyfilled:
- getEntries
- getEntriesByName
- getEntriesByType
- now
- timeOrigin
For legacy browsers, only NavigationTiming
will be returned.
- make this project a polyfill