code with words

This commit is contained in:
Adam Bradley
2013-08-25 01:32:30 -05:00
parent 8f59ba549a
commit 583c0826eb
14 changed files with 244 additions and 90 deletions

View File

@ -1,13 +1,46 @@
(function(window, document, framework, $) {
(function(window, document, framework) {
framework.on("ready", function(){
console.log("ready")
// this file should not be apart of the build
// its just just for testing that the correct
// events are being triggered and at the correct
// times, and so we don't have to hardcode/remove
// console calls throughout the code
framework.on('ready', function(){
console.log('ready');
});
framework.on('initalized', function(){
console.log('initalized');
});
framework.on('pageinit', function(e){
console.log('pageinit:', e.detail);
});
framework.on('pageinitfailed', function(){
console.log('pageinitfailed');
});
framework.on('pagecreate', function(e){
console.log('pagecreate, id:', e.detail.id, ", URL:", e.detail.url);
});
framework.on('pagetransition', function(e){
console.log('pagetransition, newActivePageId:', e.detail.newActivePageId);
});
framework.on('pageload', function(){
console.log('pageload');
});
framework.on('pageview', function(){
console.log('pageview');
});
framework.on('pageremove', function(){
console.log('pageremove');
});
// Test that the standard jQuery call works with our event system
$(window).on("initalized", function() {
console.log("initalized");
});
})(this, document, this.FM = this.FM || {}, jQuery);
})(this, document, FM = this.FM || {});