mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
added tests
This commit is contained in:
parent
41fda8197c
commit
1050f83bf3
5
domready/domready-tests.ts
Normal file
5
domready/domready-tests.ts
Normal file
@ -0,0 +1,5 @@
|
||||
/// <reference path="domready.d.ts" />
|
||||
|
||||
domready(function () {
|
||||
// dom is loaded!
|
||||
})
|
||||
19
ftdomdelegate/ftdomdelegate-tests.ts
Normal file
19
ftdomdelegate/ftdomdelegate-tests.ts
Normal 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);
|
||||
Loading…
Reference in New Issue
Block a user