Event unit and some minor cleanups

This commit is contained in:
Max Lynch
2013-09-25 10:42:20 -05:00
parent 37d708b05e
commit a8a2217182
3 changed files with 6 additions and 15 deletions

View File

@ -7,7 +7,7 @@
* detects special events like tap/swipe/etc. and emits them
* as custom events that can be used in an app.
*
* Portions lovingly adapted from github.com/maker/ratchet and github.com/alexgibson/tap.js - thanks guys!
* Portions adapted from github.com/maker/ratchet and github.com/alexgibson/tap.js - thanks guys!
*/
(function(ionic) {
@ -16,9 +16,7 @@
// Trigger a new event
trigger: function(eventType, data) {
// TODO: Do we need to use the old-school createEvent stuff?
var event = new CustomEvent(eventType, data);
// Make sure to trigger the event on the given target, or dispatch it from
// the window if we don't have an event target
data.target && data.target.dispatchEvent(event) || window.dispatchEvent(event);
@ -89,10 +87,6 @@
e.preventDefault();
},
handlePopState: function(event) {
console.log("EVENT: popstate", event);
},
};