Skip to content
Permalink
Browse files

Widget: return timer value from _delay

  • Loading branch information...
jzaefferer committed Sep 12, 2011
1 parent 30482cd commit 3a0340f4ee2d343cdebeb398da10c2a71a948a9f
Showing with 6 additions and 4 deletions.
  1. +5 −3 tests/unit/widget/widget_core.js
  2. +1 −1 ui/jquery.ui.widget.js
@@ -1041,19 +1041,21 @@ test( "redefine", function() {
});

asyncTest( "_delay", function() {
expect( 4 );
expect( 6 );
var order = 0,
that;
$.widget( "ui.testWidget", {
defaultElement: null,
_create: function() {
that = this;
this._delay(function() {
var timer = this._delay(function() {
strictEqual( this, that );
equal( order, 1 );
start();
}, 500);
this._delay("callback");
ok( timer !== undefined );
timer = this._delay("callback");
ok( timer !== undefined );
},
callback: function() {
strictEqual( this, that );
@@ -339,7 +339,7 @@ $.Widget.prototype = {
.apply( instance, arguments );
}
var instance = this;
setTimeout( handlerProxy, delay || 0 );
return setTimeout( handlerProxy, delay || 0 );
},

_hoverable: function( element ) {

0 comments on commit 3a0340f

Please sign in to comment.
You can’t perform that action at this time.