mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 07:41:51 +08:00
Update
This commit is contained in:
21
example/events.js
Normal file
21
example/events.js
Normal file
@ -0,0 +1,21 @@
|
||||
var logEvent = function(data) {
|
||||
var e = document.getElementById('event-log');
|
||||
var l = document.createElement('div');
|
||||
l.innerHTML = 'EVENT: ' + data.type;
|
||||
console.log(data.event);
|
||||
e.appendChild(l);
|
||||
}
|
||||
window.FM.on('tap', function(e) {
|
||||
console.log('GOT TAP', e);
|
||||
logEvent({
|
||||
type: 'tap',
|
||||
event: e
|
||||
});
|
||||
});
|
||||
window.FM.on('click', function(e) {
|
||||
console.log('GOT CLICK', e);
|
||||
logEvent({
|
||||
type: 'click',
|
||||
event: e
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user