mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-06 22:29:44 +08:00
Renamed JS files, removed ionic- prefix.
This commit is contained in:
28
js/ionic.js
Normal file
28
js/ionic.js
Normal file
@ -0,0 +1,28 @@
|
||||
(function(window, document, ion) {
|
||||
|
||||
function initalize() {
|
||||
// remove the ready listeners
|
||||
document.removeEventListener( "DOMContentLoaded", initalize, false );
|
||||
window.removeEventListener( "load", initalize, false );
|
||||
|
||||
// trigger that the DOM is ready
|
||||
ion.trigger("ready");
|
||||
|
||||
// trigger that the start page is in view
|
||||
ion.trigger("pageview");
|
||||
|
||||
// trigger that the webapp has been initalized
|
||||
ion.trigger("initalized");
|
||||
}
|
||||
|
||||
// When the DOM is ready, initalize the webapp
|
||||
if ( document.readyState === "complete" ) {
|
||||
// DOM is already ready
|
||||
setTimeout( initalize );
|
||||
} else {
|
||||
// DOM isn't ready yet, add event listeners
|
||||
document.addEventListener( "DOMContentLoaded", initalize, false );
|
||||
window.addEventListener( "load", initalize, false );
|
||||
}
|
||||
|
||||
})(this, document, ion = this.ion || {});
|
||||
Reference in New Issue
Block a user