backed out autoInitialize moving to feature request backlog

This commit is contained in:
John Bender 2011-02-06 19:20:28 -08:00
parent cbd1eb7ac9
commit a025c0bffc
2 changed files with 2 additions and 21 deletions

View file

@ -56,9 +56,6 @@
return $.support.mediaquery;
},
//automatically initialize first pages or not.
autoInitialize: true,
//TODO might be useful upstream in jquery itself ?
keyCode: {
ALT: 18,
@ -203,13 +200,9 @@
});
//dom-ready inits
if($.mobile.autoInitialize){
$($.mobile.initializePage);
}
$($.mobile.initializePage);
//window load event
//hide iOS browser chrome on load
$window.load( $.mobile.silentScroll );
})( jQuery, this );

View file

@ -34,7 +34,7 @@
test( "loading the core library triggers mobilinit on the document", function(){
expect( 1 );
$(window.document).one('mobileinit', function(event){
$(window.document).bind('mobileinit', function(event){
ok(true);
});
@ -145,17 +145,5 @@
stop();
$.testHelper.reloadLib(libName);
});
test( "auto initialization does not occur when set to false", function(){
$(window.document).one('mobileinit', function(event){
$.mobile.autoInitialize = false;
});
$.testHelper.reloadLib(libName);
ok($("html").hasClass("ui-mobile-rendering"), "Still in rendering state after library load.");
$.mobile.initializePage();
ok(!$("html").hasClass("ui-mobile-rendering"), "Rendered ok after call to initializePage");
});
});
})(jQuery);