Skip to content

Commit e7896ac

Browse files
author
Gabriel Schulhof
committed
[testHelper] Documenting the ability to add a timeout to the list of events, and some whitespace changes
1 parent 8969002 commit e7896ac

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

tests/jquery.testHelper.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,11 @@
218218
// fn(result),
219219
// { key: {
220220
// src: event source (is jQuery object or function returning jQuery object),
221-
// event: event name (is string),
222-
// NB: It's a good idea to namespace your events, because the handler will be removed
223-
// based on the name you give here if a timeout occurs before the event fires.
221+
// length: the number of milliseconds for the timeout - only used if src is not set,
222+
// event: event name (is string), only used if src is set,
223+
// (NB: It's a good idea to namespace your events, because the handler will be removed
224+
// based on the name you give here if a timeout occurs before the event fires.)
225+
//
224226
// userData1: value,
225227
// ...
226228
// userDatan: value
@@ -244,11 +246,11 @@
244246
detailedEventCascade: function( seq, result ) {
245247
// grab one step from the sequence
246248
var fn = seq.shift(),
247-
events = seq.shift(),
248-
self = this,
249-
derefSrc = function( src ) {
250-
return ( $.isFunction( src ) ? src() : src );
251-
};
249+
events = seq.shift(),
250+
self = this,
251+
derefSrc = function( src ) {
252+
return ( $.isFunction( src ) ? src() : src );
253+
};
252254

253255
// we're done
254256
if ( fn === undefined ) {

0 commit comments

Comments
 (0)