File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66/**
77 * performance.now
88 */
9- ( function ( ) {
9+ ( function ( ) {
1010
11- if ( "performance" in window == false ) {
12- window . performance = { } ;
13- }
14-
15- Date . now = ( Date . now || function ( ) { // thanks IE8
16- return new Date ( ) . getTime ( ) ;
17- } ) ;
18-
19- if ( "now" in window . performance == false )
20- {
21- var nowOffset = Date . now ( ) ;
22-
23- if ( performance . timing && performance . timing . navigationStart ) {
24- nowOffset = performance . timing . navigationStart
11+ if ( 'performance' in window === false )
12+ {
13+ window . performance = { } ;
2514 }
2615
27- window . performance . now = function now ( ) {
28- return Date . now ( ) - nowOffset ;
16+ // Thanks IE8
17+ Date . now = ( Date . now || function ( ) {
18+ return new Date ( ) . getTime ( ) ;
19+ } ) ;
20+
21+ if ( 'now' in window . performance === false )
22+ {
23+ var nowOffset = Date . now ( ) ;
24+
25+ if ( performance . timing && performance . timing . navigationStart )
26+ {
27+ nowOffset = performance . timing . navigationStart ;
28+ }
29+
30+ window . performance . now = function now ( )
31+ {
32+ return Date . now ( ) - nowOffset ;
33+ }
2934 }
30- }
3135
3236} ) ( ) ;
You can’t perform that action at this time.
0 commit comments