added tests

This commit is contained in:
dotnetnerd 2014-01-23 15:14:28 +01:00
parent 41fda8197c
commit 1050f83bf3
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,5 @@
/// <reference path="domready.d.ts" />
domready(function () {
// dom is loaded!
})

View File

@ -0,0 +1,19 @@
/// <reference path="ftdomdelegate.d.ts" />
function handleButtonClicks(event) {
// Do some things
}
function handleTouchMove(event) {
// Do some other things
}
window.addEventListener('load', function() {
var delegate = new Delegate(document.body);
delegate.on('click', 'button', handleButtonClicks);
// Listen to all touch move
// events that reach the body
delegate.on('touchmove', handleTouchMove);
}, false);