Skip to content
This repository has been archived by the owner on Dec 15, 2019. It is now read-only.

Added a condition to check if properties in the Navigation timing API are available - Fixes #149 and #157 #171

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/renderers/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Physics.renderer('dom', function( proto ){
}
}

if (name in tmpdiv.style){
if (prop in tmpdiv.style){
return thePrefix[prop] = prop;
}

Expand Down
2 changes: 1 addition & 1 deletion src/util/ticker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

function now(){
// http://updates.html5rocks.com/2012/05/requestAnimationFrame-API-now-with-sub-millisecond-precision
return (perf && perf.now) ?
return (perf && perf.now && perf.timing && perf.timing.navigationStart) ?
(perf.now() + perf.timing.navigationStart) :
Date.now();
}
Expand Down