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

@ -17,7 +17,9 @@
// Some convenient top-level event functions
framework.trigger = function(type, data) {
window.dispatchEvent(new CustomEvent(type, data));
window.dispatchEvent(new CustomEvent(type, {
detail: data
}));
};
framework.on = function(type, callback, element) {
@ -94,4 +96,5 @@
window.addEventListener('touchend', _touchEnd);
window.addEventListener('click', _click);
window.addEventListener('popstate', _popstate);
})(this, document, this.FM = this.FM || {});
})(this, document, FM = this.FM || {});