Skip to content

Instantly share code, notes, and snippets.

View yesasha's full-sized avatar

Aleksandr Yefremov yesasha

  • Israel
View GitHub Profile
@yesasha
yesasha / performance.now.polyfill.js
Last active July 8, 2016 10:52 — forked from paulirish/performance.now()-polyfill.js
performance.now() and performance.timing.navigationStart polyfill
// performance.now() and performance.timing.navigationStart polyfill
if (!window.performance) {
window.performance = {};
}
if (!performance.now) {
performance.now = function () {
return Date.now() - this.timing.navigationStart;
}
}