npm

Need private packages and team management tools?Check out npm Orgs. »

timing2

0.3.3 • Public • Published

timing2 Build Status npm version Coverage Status npm downloads

A PerformanceTimeline polyfill for legacy browsers.

ATTENTION!! This project is currently under active development, API may subject to change until it reaches 1.0.0, DO NOT use in production at this moment.

Usage

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/timing2@0.3.0/lib/timing2.js"></script>
<script>
  timing2.getEntries();
  timing2.getEntriesByName(name);
  timing2.getEntriesByType('navigation');
  timing2.now();
  timing2.timeOrigin;
</script> 

API

The following methods and properties of window.performance is polyfilled:

  • getEntries
  • getEntriesByName
  • getEntriesByType
  • now
  • timeOrigin

For legacy browsers, only NavigationTiming will be returned.

ChangeLog

v0.3.0

  • make this project a polyfill

install

npm i timing2

Downloadsweekly downloads

1

version

0.3.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability