mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-27 03:00:35 +00:00
account for child page events
This commit is contained in:
parent
7a84306cc2
commit
b3fdbcbb78
1 changed files with 12 additions and 3 deletions
|
|
@ -1,14 +1,23 @@
|
|||
(function(Perf) {
|
||||
var $listPage = $( "#list-page" );
|
||||
var $listPage = $( "#list-page" ), firstCounter = 0;
|
||||
|
||||
Perf.setCurrentRev();
|
||||
Perf.pageLoadStart = Date.now();
|
||||
|
||||
$listPage.live( "pagebeforecreate", function() {
|
||||
Perf.pageCreateStart = Date.now();
|
||||
if( firstCounter == 0 ) {
|
||||
Perf.pageCreateStart = Date.now();
|
||||
firstCounter++;
|
||||
}
|
||||
});
|
||||
|
||||
$listPage.live( "pageinit", function() {
|
||||
$listPage.live( "pageinit", function( event ) {
|
||||
// if a child page init is fired ignore it, we only
|
||||
// want the top level page init event
|
||||
if( event.target !== $("#list-page")[0] ){
|
||||
return;
|
||||
}
|
||||
|
||||
Perf.pageLoadEnd = Date.now();
|
||||
|
||||
// report the time taken for a full app boot
|
||||
|
|
|
|||
Loading…
Reference in a new issue